Lazyloading #1135
Replies: 4 comments
-
Hi What image do you mean? Do you mean thumbnails or image inside opened Photoswipe ? |
Beta Was this translation helpful? Give feedback.
-
Thank you, I talking about image inside opened Photoswipe. |
Beta Was this translation helpful? Give feedback.
-
It seams, that preloading of neighboring slides can't be disabled - https://photoswipe.com/options/#preload Photoswipe always loads two nearby images, you can only increase number of slides to be preloaded, but can't disable this feature |
Beta Was this translation helpful? Give feedback.
-
What I did is creating a custom LazyImage component that loads when the image is in the users viewport. And use this in the content property of instead of using original property with the image url. Not sure if this should be done, but it seems to work so far for me. In case of images seen i locally cash them in some "map" so that there's no reloading triggered when used in viewport mode. You could potentially use this component also for the thumbnails in the gallery. |
Beta Was this translation helpful? Give feedback.
-
Hey,
Is their an option to do lazyloading on the image gallery?
My component will show the first image, then I want the second image to be loaded only when the gallery is open and user ask for second image.
Is this something already available or doable?
Thanks,
Arthur
Beta Was this translation helpful? Give feedback.
All reactions