Shift8 Creative Graphic Design and Website Development

CakePHP Image Version

Posted on Sun, May 02 2010 10:53:00

I built a component and helper for CakePHP called Image Version. It allows you to easily create and use various images at different sizes. For example, thumbnails. The helper wraps the CakePHP image helper so you can pass along an array of options that you normally would use, but you also have a few more options before those. That would be to control the width, height, quality, cropping for the thumbnail, "letterbox" effect when not cropping and when the image has one dimension smaller than the target size, handling for transparent images, background fill colors, and a few more goodies I'm sure somewhere. You'll have to check out the files (they are well documented).

Thumbnails, or image versions can be created from the view template or before getting to the view with the controller by using the component. You may find a very old version of it on the Bakery...That should definitely be updated. I now have a github repository for ImageVersion.