markdown-it-image-lazy-loading

a markdown-it plugin supporting Chrome 75's native image lazy-loading


Keywords
markdown-it-plugin, markdown-it, lazyload
License
MIT
Install
npm install markdown-it-image-lazy-loading@1.0.2

Documentation

A markdown-it plugin supporting Chrome 75's native image lazy-loading.

Install

$ npm install markdown-it-image-lazy-loading

Usage

const md = require('markdown-it')();
const lazy_loading = require('markdown-it-image-lazy-loading');
md.use(lazy_loading);

md.render(`![](example.png "image title")`);
// <p><img src="example.png" alt="" title="image title" loading="lazy"></p>\n

License

MIT