Aspect ratio crop
Sets target aspect ratio or aspect ratio range when cropping.
aspect_ratio=AR
aspect_ratio=AR1,AR2
Aspect ratios can be set as decimal values (1.778) or ratios (16:9).
Crop and resize
If you provide only one dimension parameter (eg. width) and aspect_ratio, the other dimension (height) will be calcualted.
If you include both width and height in the URL, aspect_ratio is ignored.
Aspect ratio crop
Aspect ratio 1.8, image is cropped to match it.
/sample.li/car1.jpg?w=400&aspect_ratio=1.8
Aspect ratio range crop
Aspect ratio is in range, image is not cropped.
/sample.li/car1.jpg?w=400&aspect_ratio=1.5,2.0
Aspect ratio range crop
Aspect ratio is not in range, image is cropped to 2.
/sample.li/kids.jpg?w=400&aspect_ratio=1.5,2.0
Was this page helpful?