[thelist] Use of Thumbnails

judah at wiredotter.com judah at wiredotter.com
Tue Dec 11 13:46:56 CST 2001


At 02:22 PM 12/11/2001 -0500, Salvatore wrote:
<snip>
>I have a photoalbum
>(http://www.palmisanonet.com/photoalbum/images.asp)
>that currently uses thumbnail-sized images and full-sized images, and Id
>like to get away from housing two images to do one job.
>
>Is there a way to specify that the original image be displayed at a
>percentage of its original width and height instead of creating two of every
>image?
>I know I can set each image to a static height and width, but what about a
>percentage?
</snip>

You might be able to do it, but I'd advise against it.  The big reason: 
page size.

The reason you have thumbnail pages in the first place is so the visitor 
can get an idea of which images appeal to him/her without have to load all 
of the large images at once.  If you make a page that simple squishes the 
picture dimensions, you will not have done anything for the file sizes.  On 
your family page, you have 19 pictures.  Each of the thumbnails is fairly 
small (3 to 16 K from what I saw).  That makes for a page that is 80 or 90 
K.  Pretty good size, but not prohibitive.  Each thumbnail links to an 
image that is 70 to 140 K.  If all of those images were on one page, the 
page size would be more like 1900 K.  That's a big page.  And even if you 
change the dimensions, the browser still has to read the full image file 
and then it takes even more time to redraw the image with the dimensions 
you specified.

So I'm afraid there isn't any good way around thumbnails for your 
situation.  You could investigate the possibility of auto-generating 
thumbnails.  You could have your script loop through a directory of images 
and create thumbnails for images without existing thumbnails.  Then have 
your display page create the necessary table structure and display the 
thumbnails.  That way all you would have to do on your end is drop the full 
sized images into a directory.

Just a thought.

Judah





More information about the thelist mailing list