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.
i.e. http://domain.com/images/an-image.jpg?w=400
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?

Enter: ColdThumbs!

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.

Comments are closed.

About

Simian Enterprises is the trading name of Gary Stanton, a freelance web developer working by the sea in Brighton, UK. Gary's been creating websites since 1996 and still loves it. Read more

Contact

Gary Stanton

Email:

Tel:
01273 775522

Twitter

No public Twitter messages.

Delicious Feed

Website Design & Development