The Smart Image Resizer for PHP: An Easy Way to Resize Images

Page content

Resizing Images

Anyone engaged in website design will inevitably run into problems with resizing images at some stage and it can be annoying and time consuming to use an art package in order to resize them. The PHP friendly Smart Image Resizer from Shifting Pixels is an extremely handy wee PHP script that takes all of the pain out of resizing your images. There is no need to modify the image or tweak any code and you only need to upload the image in high resolution once and then the script will take care of the rest. You can reuse the image as many times as you like at any size and wherever you want it.

Features (4 out of 5)

This is a major time saving device and it doesn’t just resize images it can also sharpen them, crop them based on height to width ratios and even color fill transparent PNGs and GIFs. The Smart Image Resizer will happily work with JPEGs, PNGs and GIFs. It also features built-in caching to keep image variations for optimal performance.

Ease of Use (4 out of 5)

In order to use the Smart Image Resizer you’ll need to have PHP 5.1 or above and you’ll need the GD library installed. You simply the download the file for free from Shifting Pixel unzip to your web server and create a writable directory called imagecache.

How To Use

You can resize an image with the following code.

Or resize and crop it into a square like this.

Overall (4 out of 5)

So everything is handled from the src attribute of the img tag. Simple and easy and it could save you a fair bit of time. The Smart Image Resizer has been released under a Creative Commons Attribution Share Alike 3.0 United States license.

If you work with PHP and currently waste a lot of time resizing your images and uploading alternative sizes then this script is definitely for you.