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
{{ message }}
Repository navigation
When opening the LightBox, it loads every image. #26
I am experiencing a similar issue. It seems like if there are too many images the lightbox won't open until all the images are loading. Causing it to seem like the feature is not working to the end user.
I know that it works though because once images are loaded the lightbox works. Is there a solution for this?
LightBox propagates all props to <img> element and thus enables native browser lazy loading. I've tested it in desktop Chrome: when LightBox is opened only one extra image is loaded by browser. Looks perfect for me. Have not tested it on mobile yet.
Activity
guillenjs commentedon Nov 5, 2022
I am experiencing a similar issue. It seems like if there are too many images the lightbox won't open until all the images are loading. Causing it to seem like the feature is not working to the end user.
I know that it works though because once images are loaded the lightbox works. Is there a solution for this?
andreynovikov commentedon Feb 28, 2023
As a workaround I've added
loading: 'lazy'to every image entry in array like that:LightBox propagates all props to
<img>element and thus enables native browser lazy loading. I've tested it in desktop Chrome: when LightBox is opened only one extra image is loaded by browser. Looks perfect for me. Have not tested it on mobile yet.