I'm trying to get lazySizes to work with slick.js. Does anyone have any solutions to make this work. I have a slider with roughly 40 images on it and I would like to lazy-load the images as needed or when the next slide is about to come up. I actually created a responsive background slider with lazySizes. My slider works except for the lazy-load part, on page load it loads in all 40 images at once.
<div class="full-screen-hero-background media-cover background-cover lazyload"
data-bgset="<?php echo $slider_image['sizes']['slider-image-small']; ?> [(max-width: 960px)] |
<?php echo $slider_image['sizes']['slider-image']; ?> [(max-width: 1280px)] |
<?php echo $slider_image['sizes']['slider-image-retina']; ?>"
data-sizes="auto" role="img" aria-label="<?php the_title(); ?>">
</div>
here is my slick init
autoplay: true,
slidesToShow: 1,
slidesToScroll: 1,
autoplaySpeed: 2500,
speed: 3500,
fade: true,
arrows: false,
dots: false,
pauseOnHover: false,