Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy Loading #24

Closed
steverob opened this issue Apr 24, 2014 · 1 comment
Closed

Lazy Loading #24

steverob opened this issue Apr 24, 2014 · 1 comment

Comments

@steverob
Copy link

Hi, Amazing plugin!!

I have a situation where I load really large number of images and the users are having to download 40 MB. Its taking a long while to load.

Is it possible to do lazy loading of images? I can supply the image dimensions from the server side.

Or can we do it like this? - Use div in place of img? and use background-image to show images. I can lazy load background images and your plugin gets the width and height it needs.

Please point me in the right direction ❤️

@miromannino
Copy link
Owner

Today I tried to have the lazy loading as you described, but for a lot of technical problems that's not possible.

To solve the problem you just need to use the amazing feature that distinguish justified gallery from other gallery plugins: Suffixes!

You need to have in the server your images (40MB) (e.g. img1.jpg, img2.jpg...), and also their thumbnails (img1_t.jpg, img2_t.jpg, ...), and also other sizes if you want. In the gallery you need to put only the thumbnails. The gallery is loaded very fast, and then the images will be replaced with the bigger one, only if needed (lazy loading).

For the background-image there is no particular reason to do a semantically wrong gallery. Also plugins as colorbox can't manage them correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants