phpThumb

Description

phpThumb allows you to easily generate thumbnails in php on-the-fly. The thumbnails are resized in a way that maintains their aspect ratio so that they don't appear squashed or stretched.

Example

 

Implementation

Download thumb.zip.

You will need to edit thumb.php and configure the images path, you can also set the default height and width.

You can then call a thumbnail like so:

<img src="thumb.php?f=tiger.jpg&w=200&h=200" />

f is the filename
w is the width in pixels (optional)
h is the height in pixels (optional)