Need help with lazyload-image?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

1000ch
208 Stars 13 Forks 57 Commits 2 Opened issues

Description

HTMLImageElement extension for lazy loading.

Services available

!
?

Need anything else?

Contributors list

No Data

🚩 Finally Native lazy-loading for the web was introduced. I recommend you to use

loading
attribute instead.

lazyload-image

HTMLImageElement extension for lazy loading. Images will be loaded when they are shown.

Install

Install

lazyload-image
via npm.
$ npm install lazyload-image

Usage

Import

LazyloadImage
and register it.
import LazyloadImage from 'https://unpkg.com/lazyload-image';

customElements.define('lazyload-image', LazyloadImage, { extends: 'img' });

Modify your

elements such as following.

Fallback

If a browser does not support

customElements.define()
, images will be loaded as usual.

License

MIT © Shogo Sensui

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.