glide
glide copied to clipboard
Lazyloading images
Hi i would like to propose a feature where you lazyload images so they only gets loaded if they are about to be shown. I guess it's possible to do manually with events and run.before but it would be nice to have just as a setup. /h
I don't know if this is still a relevant question, but I know in #2 it was mentioned that it wasn't really in the spirit of the project. I'm sure there is a hacky way to get lazysizes to work with it though
+1 Need lazyload
+1
+1
+1
+1
+1
For modern browsers you should be able to just add loading="lazy"
to the images.
Does that really work with hidden images that is in browser window. Because you dont want to load all images just because the slideshow is inscreen
Yes. https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading#Images_and_iframes
No, loading=lazy does not work. Per the web.dev documentation:
Only images that are below the device viewport by the calculated distance load lazily. All images above the viewport, regardless of whether they're immediately visible, load normally.
Glide is a carousel. Why would it come with something specific to images?
In my opinion lazy load is mandatory for carousels and it's perfectly fine to lazy load everything but the code and the text is difficult to stop from loading but images is easy to lazy load and they are also the bulk of the data.
+1
Any chance. this is something that is gonna be implemented?
Opened a PR #641 to start tackling this issue but not sure how active maintenance is so may take a while