Click to See Complete Forum and Search --> : Opinions on thumbnail-ing method


Handyman
10-23-2004, 01:01 PM
Greetings,

I'm working on a new gallery system for a photography site and was wondering what everyone thought would be a better method for creating thumbnails. Should they be created at the time of upload, be stored as their own separate file and then served when needed. Or would it be a better idea to create them on the fly, only when needed (ie using a "/thumbnail.php?image.jpg" as the src attribute in the img tag).

I can see advantages both ways. If they're done on the fly I can save server space and also change thumbnail sizes later on without having to recreate every single one. If they're all ready precreated, then thumbnail pages should load faster... I think.

I guess that's my major question. Would always creating the thumb on the fly significantly slow down a page load (20 thumbs per page)? The thumbs created would drop from about 750x460 to about 120x80 pixels, so the resample isn't entirely huge.

Thanks in advance!