Erase images CLS automatically with this Markdown Exit plugin.
Erase images CLS automatically with this Markdown Exit plugin.
width and height on images to prevent Cumulative Layout Shift (CLS).loading="lazy" for better performance.Based on the article Markdown Exit Breaks the Rules With Async Rendering.
pnpm add -D markdown-exit-image
[!NOTE]
Contributions, through issues or pull requests, to extend support for other frameworks are welcome!
import { image } from 'markdown-exit-image'
md.use(image, {
// Options
})
publicFolderstring"public"The path to the public folder where the images are stored.
[!WARNING]
This plugin requires images to be stored locally. Please, open an issue if you need support for remote images.
MIT License © 2025-PRESENT Estéban Soubiran
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.