Here's a helper function I whipped together for handling lazy loading stuff:  function handleLazyLoad(config={}) { let lazyImages = gsap.utils.toArray("img[loading='lazy']"), timeout = gsap.delayedCall(config.timeout || 1, ScrollTrigger.refresh).pause(), lazyMode = config.lazy !== false, imgLoaded = lazyImages.length, onImgLoad = () => lazyMode ? timeout.restart(true) : --imgLoaded || ScrollTrigger.refresh(); lazyImages.forEach((img, i) => { lazyMode || (
    • Like
    4