Home Resizing and Caching Images

Resizing and Caching Images

The previous version of the jrjBlog was based on the excellent open-source Mango ColdFusion blog engine. I liked it primarily because it was easy to tweak the code and implement fun new features on the site, but in the end I finally gave up and migrated to WordPress because of the availability of so many wonderful plug-ins.

One thing I really miss is the image caching server that I had written for the old jrjBlog. It allowed me to store a single high-resolution version of each image, and dynamically request and cache an infinite number of resized versions. I’m now in the process of bringing this feature back to the site (primarily so I can serve high-resolution images to high density screens like Apple’s retina displays, and lower-resolution images to mobile devices.) Since I was separating the image server from dependencies on the old jrjBlog site, I figured I’d make it open source.

I’ve [published the source code to GitHub], including all necessary source files to get up and running. I even included a couple of images to make it easier to test and confirm that everything is set up correctly. It’s licensed under the MIT license.

View on GitHub

The system requires ColdFusion, and has been tested with versions 8, 9, and 10. It works fine on Unix, Linux, Mac, or Windows servers. Should work fine with any of the popular CF hosting providers. I haven’t tested it on Railo or anything, if anyone wants to tweak it to work on an open source CFML engine I’m cool with it, but I’m too lazy to do it myself.

Enjoy, and let me know if you have any issues.

This post is licensed under CC BY 4.0 by the author.