markdown-it-implicit-figures
Render markdown images to a paragraph as a figure
This is a small JavaScript tool that improves how images appear when you convert markdown (plain text with simple formatting) into HTML web pages.
Here's the everyday problem it solves: when you write markdown and put an image by itself on its own line, the tool recognizes that and wraps it in a ` tag instead of just a plain tag. The ` tag is the proper semantic HTML for images that are meaningful content—like photos in an article or diagrams—rather than decorative icons. If an image is mixed in with text on the same line, it stays as a regular image tag. So the tool is smart enough to know the difference.
For example, if you write an image on its own line in markdown, it becomes a proper figure element that you can style and interact with. The tool also offers optional extras: you can add captions from the image's alt text, make images load lazily for faster pages, add accessibility features like keyboard navigation, or automatically link images. All of these are optional toggles you turn on or off depending on what you need.
The main audience would be people building blogging platforms, documentation sites, or content management systems where markdown gets converted to HTML—basically anyone publishing written content with images on the web. This is a plugin that works with markdown-it, a popular markdown converter for JavaScript projects. The particular version here adds support for ES modules, which is a modern way to organize JavaScript code that many projects prefer today.