precrop

Removes pixels from an image before any other transformations occur.

Identical to crop except that precrop is performed before any other transformations.

Examples

Click the links to view the transformed image using a demo Fastly IO service.

Example usageDescription
?precrop=150,100Pre-crop the image to 150px by 100px
?precrop=16:9Pre-crop the image to an aspect ratio of 16:9
?precrop=150,100,x50,y50Pre-crop the image to 150px by 100px and select the starting sub region x coordinate to be 50px and the y sub region to be 50px
?precrop=1:1,offset-x0.25,offset-y0.50Pre-crop the image square and offset the x-axis 25% and the y-axis 50%
?precrop=3000,600,x100,x100,safeFail-safe pre-crop the image to 3000x600 and select the starting sub region x coordinate to be 100px and the y sub region to be 100px
?precrop=1:1&width=200Pre-crop the image square and resize the width to 200px
?trim=0.30&width=200&precrop=1:1,smartTrim 30% of the image, resize the width to 200px and pre-crop the image square using content-aware image cropping