Links

Cropfit

Automatic crop or fit based on origin dimensions
Performs either Crop or Fit operation depending on the origin image and the desired transformation dimensions.
If the desired image is smaller than the original, the result is cropped to achieve the desired dimensions.
func=cropfit

Examples

Preview
Syntax
​
​
Original image (650x500 pixels): /docs/classroom.jpg​
​
​
​
​
Original image (400x250 pixels): /docs/ny_doc.jpg​
​
​

Using cropfit with trim

If you include the Trim operation in the URL, the image will be trimmed first (if possible) and then either cropped or fitted to the desired size.

Examples

Preview
Syntax
​
​
Original image: /docs/sofa.jpg​
​
​
​
​
Last modified 1mo ago