Hi, For those interested, this is a script I use all the time for turning a JPG image into a thumbnail. Much better than storing 2 copies of the same thing at different sizes. This works using the GD image library, which is installed on DreamHost servers. Unfortunately, DreamHost have an old version of GD which only supports 256 colour JPGs (new version supports 16 bit colour) but for small thumbs you don’t notice anyway.
To use this script, save the code below as “image.pcgi” somewhere in your main web folder. Then you need to call the script within your HTML like this…
![]()
This will resize “images/whatever.jpg” to “100” pixels across the longest side and display at “60%” jpg quality - higher quality images look better but are slower to download.
This script is used extensively on this page http://www.fireladder.net/claninfo.php?viewclanid=14 - feel free to have a look around and see if it is what you are after. Hope this helps somebody out - I have found it extremely useful 
//////////CODE BELOW - SAVE AS image.pcgi in your main directory
<?php
//SET THE DEFAULT VALUES
if ($id == "") {$id = "default.jpg";} //FILENAME DEFAULTS TO "default.jpg"
if ($sz == "") {$sz = "100";} //SIZE DEFAULTS TO 100 PIXELS
if ($ql == "") {$ql = "50";} //QUALITY DEFAULTS TO 50%
//DO NOT EDIT BELOW THIS LINE
//REMOVES .JPG or .JPEG FROM $ID AND SAVES AS NAMEONLY
$pos = strrpos($id, ".jp");
if ($pos === false) {
// not found...
} else {$nameonly = substr ($id, "0", $pos);}
////////////////////////////////////////////////////////
$im = imagecreatefromjpeg("$id"); //DONT FORGET FILE PATH
$im_width=imageSX($im);
$im_height=imageSY($im);
// work out new sizes
if($im_width >= $im_height)
{
$factor = $sz/$im_width;
$new_width = $sz;
$new_height = $im_height * $factor;
}
else
{
$factor = $sz/$im_height;
$new_height = $sz;
$new_width = $im_width * $factor;
}
// resize
$new_im=ImageCreate($new_width,$new_height);
ImageCopyResized($new_im,$im,0,0,0,0,$new_width,$new_height,$im_width,$im_height);
// output
header("Content-type: image/jpeg");
header( "Content-Disposition: attachment; filename=$nameonly" );
header( "Content-Description: PHP Generated Image" );
Imagejpeg($new_im,'',$ql);
// cleanup
ImageDestroy($im);
ImageDestroy($new_im);
?>