Lazyloader using vue
npm install @startselect/vue-lazyloaderjs
import VueLazyLoader from '@startselect/vue-lazyloader';
Vue.use(VueLazyLoader);
`
Update the image tags
All the images that should be lazyloaded should be updated like this:
`html
`
You can change data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== to anything else.
We did this to load a blank image before this image becomes visible in the viewport.
Options
Available options:
`js
Vue.use(VueLazyLoader, {
offset: 150
});
``