Crop

Allows you to crop the image from all sides by the given dimension.

Crop
Parameter Possible value Description
?clevercrop=on on (required to be used with w= and h= parameters) Cuts the desired dimension from the image (may also enlarge / reduce)
?gravity=l t | b | l | r t - top / b - bottom / l - left / r - right - specifies the crop area
?crop=20 Target crop size in pixels Removes a strip of this size from all sides of the image.
?crop=20,10 Target crop size in pixels Removes a strip of 20px top and bottom, 10px left and right.
?crop=20,10,15 Target crop size in pixels Removes a strip of 20px top, 10px left and right, and 15px bottom.
?crop=20,10,15,5 Target crop size in pixels Removes a strip of 20px top, 10px right, 15px bottom and 5px left.

Example

https://[API-KEY].imagedit.io/v1/https://yourdomain.com/images/img.png?clevercrop=on&w=200&h=150

https://[API-KEY].imagedit.io/v1/https://yourdomain.com/images/img.png?clevercrop=on&gravity=tl&w=200&h=150

https://[API-KEY].imagedit.io/v1/https://yourdomain.com/images/img.png?crop=20