Dynamically resize images with ColdThumbs
Monday, March 12th, 2012
A few days ago I was coding up a WordPress theme for a client who intended to move away from WordPress.com.
One thing I noticed is that on the WordPress.com installation, images were dynamically resized by adding a parameter after the image file extension.
Since many of the posts linked to images in this way, I had to find a way to replicate it into the WordPress installation on the local server. A quick Google search and I discovered ‘TimThumb‘, a php script for dynamically resizing images, very popular amongst WordPress theme developers.
Within a few minutes, I had the functionality I was looking for.
‘Very cool’, I thought to myself… So why can’t I do this in ColdFusion?
Inspired by TimThumb, ColdThumbs is allows you to dynamically resize an image (local or external) to your desired dimensions.
The script will automatically create a cached version of your resized image and return the image as content.
I developed this as a bit of fun one Sunday (yeah, that’s how I roll) and have put it up as my first project on RIAForge. It’s working great for me, but I’d love to hear feedback or feature requests from anyone using it.
Check out the ColdThumbs page for full details.
Filed under: ColdFusion.