DashboardbinpatchAstro MDX `![](/path.svg)` ignores base…

Astro MDX `![](/path.svg)` ignores base config

Category: gotcha
Confidence: 0.90
ID: 019fb4f9-4f95-7344-9273-61ed23d94231
Project ID: 54d50d32-8b5f-41b9-91dd-4473e4ccdbfd
Cross-project: No
Recalled in other projects: 1
Source session: 15RoSYqPKRifRJ68q
Created: 2026-07-30 20:53:08
Updated: 2026-07-30 21:41:05

Cross-Project Recalls

ProjectHitsLast recalled
cli 1 8d ago

Content

Trap: ![](/path.svg) in MDX does NOT respect Astro's base config — image 404s on PR previews (https://binpatch.p.byk.im/_preview/pr-N/) because the base prefix is missing. Looks correct locally because base defaults to /. Fix: use inline JSX <img src={${import.meta.env.BASE_URL.replace(//$/, "")}/path.svg} alt="..." />. Same trailing-slash gotcha as MarkdownLink.astro href resolution. Patched in commit 4f241b1.

Move to: