Gallery Large Amount of Images

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
Barrowboy
Forum Members
Forum Members
Posts: 223
Joined: Mon Dec 16, 2013 4:09 pm

Gallery Large Amount of Images

Post by Barrowboy »

Does anyone know how to to pre-load a large amount of images with in the Gallery.

When selecting the Gallery it takes an age to load all the images.

We are using the latest cmcms 1.12.1 and Gallery 2.0.2

Thanks for any help
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Gallery Large Amount of Images

Post by Rolf »

Use the Gallery pagination for this.
Or use endless scrolling http://www.cmscanbesimple.org/blog/cmsm ... -scrolling
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Gallery Large Amount of Images

Post by velden »

Barrowboy wrote:Does anyone know how to to pre-load a large amount of images with in the Gallery.

When selecting the Gallery it takes an age to load all the images.

We are using the latest cmcms 1.12.1 and Gallery 2.0.2

Thanks for any help
Not sure what you mean by 'preloading'.

I guess you can preload images when you display a page with none, one or only a few images. If the page (html source) contains more 'links' to the rest of the images AND the (js) logic to preload that could work.
When selecting the Gallery it takes an age to load all the images.
This suggests that you display all images on the page (that's why it takes long) but don't think there's a way to preload.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Gallery Large Amount of Images

Post by Jos »

In stead of pre-loading, take a look at lazy loading: only load the visible images. https://plugins.jquery.com/lazyload/

You can find an example here: http://tinyurl.com/q72rnmu
It is easy to integrate this in a Gallery template.
Barrowboy
Forum Members
Forum Members
Posts: 223
Joined: Mon Dec 16, 2013 4:09 pm

Re: Gallery Large Amount of Images

Post by Barrowboy »

Hi All

Thanks for your suggestions.

Just to explain a little more, we have over 1000 images in one gallery on a gallery page, these are paginated into 30 images per page.

I idea of a pre load would be that on first visiting to the site the images would load from the home page in the background thereby when selecting the gallery page there would be no delay or very little.

I will take a look at the lazy load plug to see if that would help.

Thanks
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Gallery Large Amount of Images

Post by velden »

I'm certainly not an expert on this subject

Do you realize that, depending on chosen method and implementation, this could increase data usage a lot? Because users that visit your homepage will (at least) download 30 (and in worst case implementation 1000) images while you're not sure they will actually visit the gallery.

Then, if they do visit the gallery is it sure, or very likely, they start at page one?

I do think there are some methods to let a browser load images into the browser's cache. Probably you need to use the pagination logic to know which images (next 30?) to pre-load. And I think it would involve some ajax to actually get the 'links' to the next 30 images.
Locked

Return to “Modules/Add-Ons”