this post was submitted on 09 Feb 2026
9 points (100.0% liked)

Free and Open Source Software

21783 readers
3 users here now

If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 3 years ago
MODERATORS
 

I've been working on a plugin to solve the issue of responsive images in Markdown without breaking standard syntax.

I've been using marked.js for a personal project, and found one big issue with markdown in the context of modern web content is the lack of responsive image support. So I hacked together a little extension that adds an srcset sizes and loading="lazy" tags to the generated image.

I wanted to make sure this didn't break markdown, so I made it use the file name to generate all the variants, while still keeping the standard markdown image code fully functional.

Just wanted to share in case anyone else finds it useful!

Link: github.com/ELowry/MarkedResponsiveImages

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here