markdown-it-img-lazy

a markdown-it plugin to better supporting image lazy loading

# Installation

yarn add markdown-it-img-lazy
# or
npm i markdown-it-img-lazy

# Usage

md.use(require('markdown-it-img-lazy'), /* Options */)

then you need

load Lozad.js in the head tag of your page

load imgLazy.js closer the </body> tag of your page

# Options

# useLoading

  • Type: Boolben
  • Default: true

Use the native image lazy-loading for the web

if useLoading = true
![img](img.jpg) -> <p><img alt="img" loading="lazy" data-src="img.jpg" class="lazy"></p>

if useLoading = false
![img](img.jpg) -> <p><img alt="img" data-src="img.jpg" class="lazy"></p>

# selector

  • Type: string
  • Default: lazy

Default class name for image

vuepress-plugin-img-lazy

vuepress-plugin-img-lazy

a vuepress plugin to better supporting image lazy loading