Many a time we need to create thumbnails of the uploaded images on the fly. In PHP we can create thumbnail at the time of uploading image.
The PHP functions you need to know about for this script.
Steps to generate thumbnails.
- Make a folder named ‘images’ inside your web directory.
- Make a sub folder named ‘thumbs’ inside‘images’ folder’.
- Create a PHP page for example‘thumbnail.php’ inside your root folder.
- Now place the following codes in‘thumbnail.php’.
It’s done. Now run the thumbnail.php file through your browser http://yourdomain.com/thumbnail.php