lazy loading causes thumbnails to "jump" when selecting image that was not yet loaded
I'm experiencing this "jump" when trying to go to image that was not preloaded. Is there any way to specify the "placeholder" image that would be preloaded and would be in place before the actual image is shown? or at least a way to show a blank space instead of the thumbnails jumping up and then back down when image is loaded.
I've tried adding height: 100% to .image-gallery-image and .image-gallery-slide but it does not seem to do the trick.
Am I missing something?
You can see the behaviour demonstrated here
i'm using the following code to create the image gallery:
<ImageGallery
items={this.state.images}
lazyLoad={true}
showIndex={true}
defaultImage={imagePath('2_1_no_image.png')}
showPlayButton={false}
/>
and this.state.images is an array of objects with only thumbnail and original keys for each object in array.
Thank you for any information that could help debug this issue.,
I have the same issue, did anyone find a good workaround?
Unfortunately, because of lazyLoad the height necessary to fill the container for the gallery is unknown when you try to go to an image that is not preloaded. A workaround for this is to override/add a fixed height to one of the wrappers (assuming your gallery & images have a fixed height).
.image-gallery-slides {
height: 500px;
}
This will keep the image height fixed.
