HTMLImageElement extension for lazy loading.
# via npm
$ npm install lazyload-image
# via bower
$ 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">
If browser does not support document.registerElement()
, Images will be loaded as usual.
Recommend you to open DevTools's Elements tab to see behavior of <lazyload-image>
.