markdown-it-image-lazysizes
A markdown-it plugin to support lazy loading of images using lazysizes.
The plugin makes lazyload possible by:
- Move
src
todata-src
- Add class
lazyload
to img tag.
lazysizes has to be installed to make this plugin work.
Install
npm i -D markdown-it-image-lazysizesnpm i -D lazysizes
Usage
const md = ;const lazy_loading = ;md; md;// <p><img alt="" title="image title" class="lazyloading" data-src="example.png"></p>\n
Add the lazysize
javascript:
Related Information
Contribution
This is a minimum plugin. Please open an issue when you need more functionalities or something doesn't work!