Aspect ratio crop

Crop by aspect ratio or aspect ratio range

Sets target aspect ratio or aspect ratio range when cropping. Aspect ratios can be set as decimal values (1.778) or ratios (16:9).

aspect_ratio=AR | ar=AR

aspect_ratio=AR1,AR2 | ar=AR1,AR2

Crop and resize

If you provide only one dimension parameter (width or height) and aspect_ratio, the other dimension will be calculated. If you include both width and height in the URL, aspect_ratio is ignored.


Original aspect ratio (3:2 or 1.5): /

Crop without resize

If you provide only aspect_ratio and no dimensions (width or height), the image will be cropped without resizing.



Original aspect ratio (1.323): /

Aspect ratio range

You can specify a range of aspect ratio values, for example, aspect_ratio=4:3,16:9. Images that fall within this range, will not be cropped. Useful to avoid very wide or very tall images by cropping them to the closest aspect ratio.


Original aspect ratio 1.5: /

Aspect ratio range 1.5..2 (no crop needed): /,2.0

Original aspect ratio 2.25:1 (2.25): /

Aspect ratio range 3:2..2:1 (1.5..2): /,2:1

Last updated