Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re(2): Image Gallery script

by dmmiller2k (Chaplain)
on Dec 26, 2001 at 20:49 UTC ( #134416=note: print w/replies, xml ) Need Help??

in reply to Re: Image Gallery script
in thread Image Gallery script

Thanks, merlyn!!

I knew it wouldn't be a waste of time posting this script here. From your cited article [bold accents added]:

Thumbnails, which are miniature versions of the original pictures, help the visitors to a site decide whether they want to take the time to download the entire picture. (Please don't confuse this with what one of my friends calls dumbnails, which are fullsized downloads that are scaled in the browser to be small. Lame.) There's nothing worse than spending two to five minutes downloading a typical JPEG file, only to discover that you've already got it, or it looks, well, useless.

Admittedly, I am, in fact, using so-called "dumbnails" when there are no thumbnails available.

As it happens, in this particular application, this turns out not only NOT to be a bad thing, it actually turns out to be a good thing: scaling the full-sized images into thumbnails, in effect, caches them at the browser, making the gallery somewhat faster than when I supply actual thumbnails (presuming most kids' parents will wind up looking at every image, which appears to be the case 9 times out of 10).

Typical image sizes created with Kid Pix Studio Deluxe on a machine with a 800x600 pixel screen average anywhere from 3 to 18 Kb in size, or 2 to 12 seconds each to download on a typical dialup speed connection.

One pleasant side effect of using frames is that even before all of the so-called dumbnails are loaded, clicking on one to display it full-sized in the other frame seems to affect the background downloading (caching) of the remaining images not at all.

Your point is well taken, however, that I am forcing users to unnecessarily download ALL of the images; I agree that in probably any other context, this simply would NOT be acceptable. Here, however, the users are almost all, shall we say, motivated.

Next, I plan to augment the script with a version of the solution you present in the article, above, hopefully making it more acceptable for other applications.


You can give a man a fish and feed him for a day ...
Or, you can
teach him to fish and feed him for a lifetime

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://134416]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-03-01 07:17 GMT
Find Nodes?
    Voting Booth?

    No recent polls found