lightGallery
lightGallery copied to clipboard
gallery to show a placeholder when size is specified in the img tag
Summary
gallery to show a placeholder when size is specified in the img tag,
Basic example
facebook does that, but I think the idea is clear
Motivation
This will stop images popping up and layout recalculations, a thing that slows down and confuses the user. This is specially useful with slow networks or big galleries.
Hey @aguaviva,
lightGallery already uses the thumbnails as a placeholder for the large images. When you click on the thumbnails(outside the gallery), the current thumbnail is resized and displayed until the actual image is loaded.
Hey @sachinchoolur
By a placeholder I meant a rectangle of a solid color, Facebook uses a blue one, that shows up until its thumbnail loads.
The placeholder has only a color and the dimensions of the placeholder, this way the browser calculates they layout just once and then replaces the placeholders with the thumbnails, this also solves the problem of multiple layout recalculations and images popping.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.