markdown-it-lazyload 0.1.1

A markdown-it plugin to add lazy to image tags' loading property
Documentation

markdown-it-lazyload

markdown-it-lazyload markdown-it-lazyload

A markdown-it.rs plugin to add lazy to loading property in <img> tag.

Usage

let mut parser = markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(parser);
markdown_it_lazyload::add(parser);

md.parse("![Rust](https://example.com/example.png)").render();
// <p><img src="https://example.com/example.png" alt="Rust" loading="lazy"></p>

See the tests for more examples.

Specification