6 days ago · 5 min read1016 words · Tech · hide · 0 comments

Motivation I have talked about image handling problems in Astro before. My main gripe was the usecase of RSS, while it is an excellent integration in Astro, there are some interesting corner cases when it comes to images and MDX. MDX is hard to handle in general, combination of JSX and MD? Recipe for confusion. So it is understandable that Astro is still figuring out ropes on it. But image handling? That's a different case. Astro does helpfully provides ways to optimize images used in your blog, but its integration with its own RSS plugin has a gotcha. Image URLs generated by astro on each build are not the same. A typical astro generated image URL is of the form: https://basedomain.com/_astro/image_name.hash.webp image_name is the file name of the image in your project, but the hash, that can change! That means an image can have one URL in todays build, but a completely different URL in tomorrows build. This is not a problem if everyone visits your website for reading your blogs, but…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.