Navigation:    Home arrow Image Thumbnail
PHP Create Image Thumbnail PDF  
Digg Reddit Ma.gnolia Stumble Upon Facebook Twitter Google Yahoo! MyWeb Furl" BlinkList Technorati Mixx Bookmark
Article Index
PHP Create Image Thumbnail
Page 2
Page 3
Page 4

In this tutorial you will learn how to generate thumbnails from form uploaded images using GD php image library. The image ratio is maintained, so the thumbnail images will not be deformed. An image verification is performed before uploading and the image size is verified.

Requirements :
You will need PHP and GD Graphics Library library installed. To see if you have gd installed on your server, create a file named info.php, plece the following content in it:


It should appear a page with infos and you can find if you have gd installed or not.

Note1: You must set the enctype form atribute to "multipart/form-data", otherwise the form will not show you any errors, but it will just not upload your images!

Note2: The only supported files are the one with png, jpg and jpeg extension. The gif format is copyrighted, so is not supported by GD library.

Create a folder named images located in the path you are planning to place the php script you are about to create, and another folder thumbs inside the folder images. Make sure the created folders have write rights for everybody or the scripts won't work ( it won't be able to upload the files into the directory).