sc
Scott avatar
ttwillsey

Astro Remark Eleventy Image

Part of the Astro series

So there I was, playing with eleventy-img to find a way to generate responsive images for image links in markdown files, when Christian Ohanaja did the work for me and created the Astro Remark Eleventy Image plugin.

I’m glad he did too, because looking at the remark part of the code, I feel confusion more than anything. I guess I have another rabbit hole to pop down to learn about THAT.

Anyway, being the true jerk that I am, instead of just being grateful and using his plugin, I forked it to add some additional options (such as the ability for the inline image to link to the high resolution version) and to add an Astro component for image optimization. That way I can have one plugin that provides image optimization in both markdown files and inside Astro components.

I’m assuming that I can technically combine a plugin and an Astro component in one project. I actually have no idea, but I’ll find out.