ractive-lazyload-img
v1.0.1
Published
A Ractive decorator that lazy-loads images when they get close to in view
Downloads
7
Maintainers
Readme
ractive-lazyload-img
A Ractive decorator that lazy-loads images when they get within 200px of the viewport.
Usage
const lazy = require('ractive-lazyload-img')
new Ractive({
el: '#content',
template: '#template',
decorators: {
lazy
}
})
<img
src="/transparent-pixel.png"
as-lazy="'/path/to/images/' + dynamicImageName"
/>