markdown-it-lazy-image
Lazy image plugin for markdown-it parser, replace 'src' attributes with 'data-src' for use with lazyload.
Install
yarn add markdown-it-lazy-image
Usage
var md = ;var lazy_image = ; md; md; // returns:////<p><img src="data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=" data-src="example.png" alt title="image title" /></p>
Options are not mandatory:
- placeholder (String or Url) - replace 'src' attributes with give placeholder
License
MIT © h404bi