You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have personally been unable to get the lazy loading to work within Flickity in any situation; even in the CodePens linked from the Flickity.js docs.
As far as this libraries integration with Flickity goes, it is simply passing an option to the Flickity library.
If someone can provide a working example of lazy loading actually working I can try to track down the issue. I will leave this open since it is a valid issue.
We had lots of issues with preloading and also lazyloading as well especially if we used a remote server or slow loading images. At the end we did ourselves a preload of the images in an old fashioned way:
exportdefaultfunctionpreloadImages(urls){// see carousel controller for more info on this methodconstpromises=urls.map(url=>{returnnewPromise(function(resolve,reject){constimg=newImage();img.onload=()=>resolve(img);img.onerror=()=>resolve(img);img.src=url;});});returnPromise.all(promises);}
Thanks for the tip @luigimannoni! Hopefully it can help someone until this is resolve. Even in the official Flickity codepen demos I couldn't seem to get the lazyloading to work 😞
bglazyload not working in angular
The text was updated successfully, but these errors were encountered: