Looking for older version? Read Tridi v1 documentation here
Tridi offers lazy loading via lazy
option. When set to true
, preloading images will not be triggered until user clicks / taps inside a Tridi container.
If lazy loading is used, autoplay will not launch until user interacts with the container.
It is not advisable to use lazy
together with hintOnStartup
. Setting both to true
will force user to make two clicks / taps to trigger image load.
lazy
(boolean) - enables / disables lazy loading images. Optional, defaults to false
<div id="tridi-lazy"></div>
const tridiInstance = Tridi.create({
element: '#tridi-lazy',
location: './path/to/image/folder',
format: 'jpg',
count: 36,
lazy: true
});
tridiInstance.load();