Shared raster
Use when a single image is shared across all locales (no per-locale variant).
docsOutput.style = "flat"— the flat link rewriter computes the depth prefix per output file, so a relative asset next to the source file (e.g.docs/figure.pngreferenced asfigure.pngfromdocs/page.md) resolves correctly in every translated output — nopostProcessing.regexAdjustmentsrule is needed. When source files live in subdirectories, enableflatPreserveRelativeDir: trueso output paths preserve the source tree (see Per-file depth prefix).docsOutput.style = "vitepress"(and other doc-system presets with a link normalizer) — site-root absolute paths such as/translation-dashboard.pngare left unchanged when the URL is identical in every locale — noregexAdjustmentsrule is needed.
Flat example: a project translates docs/guide/quick-start.md to translated-docs/docs/guide/quick-start.<locale>.md. This assumes flatPreserveRelativeDir: true so docs/guide/quick-start.md outputs to translated-docs/docs/guide/quick-start.<locale>.md (not translated-docs/quick-start.<locale>.md). A sibling image docs/translation-dashboard.png is referenced from quick-start.md as ../translation-dashboard.png. The rewriter computes the per-file prefix from the output file's directory back to the source directory (../../docs/), producing ../../docs/translation-dashboard.png. From translated-docs/docs/guide/, that resolves correctly back to docs/translation-dashboard.png.
A postProcessing rule is still needed when:
- The asset is referenced via an absolute URL in
docsOutput.style = "flat"(e.g./img/figure.png) — the flat rewriter only handles relative paths - You want to change the asset URL for other reasons (e.g. switching to a CDN)
Implementation example
This repository's own docs use the absolute-URL variant of shared images: the Translation Dashboard guide references its screenshot as  — an absolute, site-root path served from docs/public/translation-dashboard.png. Because the URL is identical for every locale, no postProcessing.regexAdjustments rule is needed.