Topic: Preloading gallery images - what options?


I'm very impressed with the demos sites of simpleviewer - its KISS and seems to work just as I'd like a web photo gallery to. My concern is whether on my proposed implementation I can improve user perceptions of performance a little based on what I'm experiencing when viewing the demo sites.

I can see preloadImages = true/false is an option. Now is this an "all or nothing" option? i.e. will it preload ALL images within a gallery/directory or just the thumbnails and images on a particular page?

What I'm seeing on the demos - e.g. the macro one is this:

When one hits the first page, as you know one is presented with a main image with 12 thumbnails underneath.
Now I can scroll though the thumbnails from 1 to 12 and when I get to scroll to thumbnail 13 and onwards the second page of thumbnails 13-24 starts loading but only when I have gotten to thumbnail 13 so I then have a noticeable delay waiting for images 13-24 to load.

Is there any way of while the user is viewing images 1 - 12 of the first page that images 13-24 preload from page 2. When one gets to viewing page 2, then images 25-36 start preloading, etc.

i.e. I don't actually want to preload the entire gallery folder - there may be a few hundred images after all - I just want to load the next full page set of thumbnails and fullsize images, i.e. current page and the next page all the time - something like a "load the current image and the next 12 (or whatever number) in the display sequence" option.

Is this possible? If not what is the closest I can get to this result with the SV products?


Last edited by Angazi (2010-07-05 11:36:57)

Re: Preloading gallery images - what options?

SimpleViewer-Pro uses the 'imagePreloading' config option to determine preloading behavior: … #mainimage

By default SV preloads the current page of images. Preloading the next page of thumbs is not currently supported.

Felix Turner
SimpleViewer Support Team.

Re: Preloading gallery images - what options?

Thanks very much for a quick response. OK based on the SV options then

imagePreloading = NEXT

but where its more like

imagePreloading = NEXT 12
imagePreloading = CURRENTPAGE + NEXTPAGE

where 12 is the user defined number of NEXT images to preload is the type of feature I was hoping to find. Please consider this as a feature request in future development.

For now I think you have a great product worth investigating so I'll d/l and check it out. Image viewing loading speed after all is nothing more server/client bandwidth cannot improve I suppose ;-)

Thanks, Cheers

Re: Preloading gallery images - what options?

The following are the preload options for the Pro version of SimpleViewer 2

imagePreloading      PAGE (is the default)   

Determines how images are preloaded. Also controls if images are kept in memory after being viewed.

    * PAGE - Preloads all images in the current thumbnail page. Unloads all images in the previous thumbnail page.
    * NEXT - Preloads image after currently viewed image. Unloads previously viewed images.
    * ALL - Preloads all images in gallery. Maximum usability. Images never unloaded. Not good for large galleries (image count > 50)
    * NONE - No image preloading. Conserves server bandwidth at cost of slower responsiveness. … #mainimage

Mike Richards
SimpleViewer Support Team.

Re: Preloading gallery images - what options?

What Angazi is suggesting is a feature I also would like to see in the next V2.x, because it is fast, userfriendly and saves al lot of bandwith compared to imagePreloading = "ALL" configuration option.

But first I need to solve my current loading problem.

I have saved the main images on a different domain to save expensive diskspace (thousands of images!) and work with galleries made by SV Picasa template V2.0.x. The gallery.xml file is modified for several of the SV PRO 2.1 configuration options.

When I embed the gallery in a HTML or PHP page it works OK (a little bid slow in loading but that's probely because the main images have to come from another domain/server. No setting used for imagePreloading, so by default per page (6 images).

However when I incorporate the svAPI for reason of getting back the imageIndex by the browsers back button or javascript: history.back(-2) the images wouldn't load automatically and the overlay (with the Caption) neither. After cliccking around on the thumnails the image shows first and some cliks later also the overlay with Caption.

I would appreciate if one of the experts will take a look at … ex.html#/1
; this page gives a script error on line 31 {svAPI is empty or no object}.

I took the code with API from the demo-page on your website.

met vriendelijke groet,