This component aims to be a simple, lightweight and non intrusive for all CakePHP Images-related works.
Tested and developed on CakePHP-2.1-RC1
- Copy
ImageUploadComponentin yourapp/Controller/Component/folder in your CakePHP application. - Include
var $components = array("Imageupload");just after Class/Controller declaration.
This is the list of parameters that you can modify in the component to achieve your goals.
Default is set uploads/ in your webroot, change that on your need. In this folder ( that for this version you need to create manually ) there must be two other folders thumbs/ and original/
This is the size that you want original image are resized to. ( The longer side will be resized to this parameter and afet proportionally will be resized also the other side whitout losing aspect ratio )
This is the size that you want thumbnails image are resized to. ( The longer side will be resized to this parameter and afet proportionally will be resized also the other side whitout losing aspect ratio )