Skip to content
David Mongeau-Petitpas edited this page Jan 27, 2014 · 1 revision

Images can be manipulated by passing options directly in the URL.

For example, if you have an image at this path:

/uploads/photo.jpg

To create a 300x300 version of this image in black and white, you use the path:

/uploads/photo-image(300x300-crop-grayscale).jpg

To help you generate the URL to an image, you can use the Image::url() function

Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'));

or

<img src="<?=Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'))?>" />