I require all my image uploads to have a fixed height of 225px and fit in a 225x225 square. The width will vary based on the aspect ratio with a maximum of 225.
The below doesn't allow for a flexible width and just makes every image 225x225.
cl_image_tag("sample.jpg", array("width"=>225, "height"=>225, "crop"=>"fill"))
http://cloudinary.com/documentation/image_transformations#fill
Here are my requirements:
1) If the image uploaded is 150w x 300h. The result will be 112w x 225h.
2) If the image uploaded is 500w x 250h. The result will be 225w x 225h.
3) If the image uploaded is 500w x 100h. The result will be 225w x 225h.
4) If the image uploaded is 50w x 100h. The result will be 112w x 225h.
5) If the image uploaded is 100w x 50h. The result will be 225w x 225h.