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
ImageUploadComponent
in 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 )
This section will be filled in the further commits. sorry guys :)
- Fork it.
- Create a branch (
git checkout -b CakePHP-ImageUploader
) - Commit your changes (
git commit -am "Added Unicorns"
) - Push to the branch (
git push origin CakePHP-ImageUploader
) - Create an [Issue][1] with a link to your branch
- Enjoy a cup of coffee. :)