Edge-detection crop

On this page

Automatically crop an image on a solid background color. Autocrop with edge detection is useful for achieving a uniform look for your images, for example to standardize ecommerce product images.

Trim image

To remove the whitespace around an object, set crop.type to trim:


Original image, not cropped Autocropped image

Increase the space between the object and the image edge by adding padding with crop.pad.x and crop.pad.y. This example adds 15% padding:


Autocropped image with 7% padding

Was this article helpful?

Get help from a Sirv expert

help ukraine help ukraine Powered by Ukrainian determination and British ingenuity

How can you support Ukraine