Autocrop

On this page

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

Set 'crop.type' to trim:

https://demo.sirv.com/trainer-grey.jpg?crop.type=trim

Original image, not cropped Autocropped image

To increase the space between the object and the image edge, add padding by using 'crop.pad.x' and 'crop.pad.y'. This example adds 15% padding:

https://demo.sirv.com/trainer-grey.jpg?crop.type=trim&crop.pad.x=15%&crop.pad.y=15%

Autocropped image with 7% padding

Was this article helpful?

Get help from a Sirv expert