0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00
astro/.changeset/warm-planes-swim.md
PolyWolf 1e11f5e8b7
feat: Pass remote Markdown images through image service (#13254)
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>


Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
Co-authored-by: sarah11918 <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
2025-02-26 10:15:35 +00:00

907 B

@astrojs/markdown-remark
minor

Adds remote image optimization in Markdown

Previously, an internal remark plugin only looked for images in ![]() syntax that referred to a relative file path. This meant that only local images stored in src/ were passed through to an internal rehype plugin that would transform them for later processing by Astro's image service.

Now, the plugins recognize and transform both local and remote images using this syntax. Only authorized remote images specified in your config are transformed; remote images from other sources will not be processed.

While not configurable at this time, this process outputs two separate metadata fields (localImagePaths and remoteImagePaths) which allow for the possibility of controlling the behavior of each type of image separately in the future.