View Full Version : automatic photo resize from thumbnail to larger size

02-10-2007, 10:52 PM
What is the best way to build a web page that will automatically resize a 400x500(or whatever) photo to a thumbnail version in my html page?

I want to be able to upload only one file to the ftp site and not 2. Here is a diagram to better explain what I am after.



02-10-2007, 11:13 PM
I wouldn;t use Javascript to do this, I would use PHP's image functions (http://us3.php.net/manual/en/ref.image.php) to dynamically resample your images and reproduce them at a smaller size...

Especially if you have a lot of thumbnails on one page, this will drastically reduce loading times of your pages....

However, if you only have a thumbnail or two per page (and your not worried about page load time), I suppose you could just use a little math, either JS or PHP (doesn;t matter which one), and CSS to resize your images...In this case, though, your full sized images will still need to be loaded to the page, after which the images can be resized...