Maintaining graphic-intensive websites can be a pain, every webmaster knows that. Having to go through the painstaking process of manually creating thumbnails is a boring and time-consuming duty we'd all like to get rid of (even if we have spent countless hours developing state-of-the-art photoshop actions sets for that purpose). Well, guess what? The time of pain is over!
While looking for interesting on-the-fly image resizing techniques, we came accross a ridiculously easy-to-use PHP script for resizing images the smart way. Created by the Joe Lencioni, the guy behind Shifting Pixel, this little piece of gold consists of a single PHP script, that you'll put anywhere on your web server along with a companion folder named "imagecache". And then you let the magic begin.
![]()
All you have to do from now โ and believe us, it's really as easy as that โ is to src to the script in every <img> tag you want to get a thumbnail for, with the proper querystring. Your tag will then look like something similar to:
<img src="image.php/output_image_name.ext?
width=nnn&height=nnn&
image=path_to__image.ext" />
Oh boy, it works like a charm!
But wait, there's more: thanks to this script, you can also get square thumbnails. These add a definitive classy touch to your pages, and just require a simple extra "&cropratio=1:1" argument in the call. Isn't the world a beautiful place? And since the usage of the script is fully transparent for the developer, it can be called from any host language โ as long as your webserver runs PHP and GD and your language outputs valid (X)HTML!
ยป Download Smart Image Resizer
14.03.08 |
Graphics |
0 |
del.icio.us
Stumble
Digg
Technorati





RSS/Atom
Comments
No comment. Nada, niente, nothing.
Wanna say something?