PHP script for resizing images the smart way
One of the challenges that comes with maintaining a graphic-intensive website like Shifting Pixel is finding a way to get high quality images throughout the site with as little effort as possible. To tackle this, I developed the Smart Image Resizer and have been using it around the site for the past few months. I couldnâ€™t be happier.
The major advantage of this script is that it allows me to resize and crop any image on my website without touching the actual image or writing any code. I upload each image once at a high enough resolution and can then reuse it at any size I want, anywhere I want. It doesnâ€™t matter if the images are in a post, on a page, or in a template fileâ€“it just works. All of the magic is done through the query string part of the URL in the src attribute of the img tag.
And, if this wasnâ€™t a big enough time-saver for me right now, itâ€™ll be a huge time-saver the next time I decide to redesign my site. Itâ€™s a relief that I wonâ€™t have to go through to resize and re-upload a thousand photos to make sure they look rightâ€“Iâ€™ll just have to change the links to them and Iâ€™ll be all set.
Resizes JPEGs, GIFs, and PNGs
Intelligently sharpens for crisp photos at any size
Can crop based on width:height ratios
Can color-fill transparent GIFs and PNGs
Built-in caching keeps image variations for optimal performance
Download that great tool here:
Posted by admin
on April 24 2008 19:18:45
||3396 Reads ·