Vanilla LazyLoad
Lightweight (2.4 kB) and flexible script that speeds up your web application by deferring the loading of your below-the-fold images, videos and iframes to when they will enter the viewport.
Installation
Add script right before closing </body>
tag, and initialize Lazyload
If you want to editing Lazyload js open file theme.js
and edit this function myLazyload();
How to trigger lazyload
In order to make your content be loaded by LazyLoad, you must use some data- attributes instead of the actual attributes.
Example
Lazy image:
Lazy image with low quality placeholder:
background image:
Lazy video:
Lazy iframe:
NOTE: It is not recommended to use one element with Aos js, because the Aos js transition will not be visible while the image is still loaded.
For complete documentation read in here