Photo by Susana Fernandez
HTMLImageElement extension for lazy loading. Images will be loaded when they are shown.
Load lazyload-image.js
in your HTML.
<script src="lazyload-image.js"></script>
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">
If browser does not support document.registerElement()
, Images will be loaded as usual.