Skip to content
HTMLImageElement extension for lazy loading.
HTML
Find file
Latest commit 3a5346e @1000ch use es2015 syntax
Failed to load latest commit information.
assets add image
.editorconfig initial commit
.gitignore initial commit
bower.json update
index.html fix href
lazyload-image.html use es2015 syntax
package.json update
readme.md fix readme

readme.md

<lazyload-image>

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

Photo by Susana Fernandez

Usage

Install lazyload-image via npm or bower.

$ npm install lazyload-image
$ bower install lazyload-image

Load lazyload-image.html in your HTML.

<link rel="import" href="lazyload-image.html">

Modify your <img> elements such as following.

<img is="lazyload-image" src="path/to/your/image.jpg" width="100" height="100">

You can specify load offset.

<img is="lazyload-image" src="path/to/your/image.jpg" offset="200" width="100" height="100">

Fallback

If a browser does not support document.registerElement(), images will be loaded as usual.

License

MIT: http://1000ch.mit-license.org

Something went wrong with that request. Please try again.