Generate image thumbnails in PHP

Thumbnails proves to be very useful in presenting various online and print media. Here I would like to share a simple function that extracts thumbnail from image. I used this a lot for simple presentations.

Supported formats : TIFF, JPEG

Usage:

Function checks if it can get thumbnail and accordingly sets heigh, width and type parameters. As you can see function can either print the thumbnail or create new image file.

Add a Comment

Your email address will not be published. Required fields are marked *