Cloudimage - Documentation

Accounts created before Nov. 1st, 2021

Accounts created before November 1, 2021 have to include /v7/ in the path, like shown below.

//token.cloudimg.io/v7/original_image_url?operations&filters

Accounts created on or after November 1, 2021 do not require /v7/ and documentation have been updated accordingly.
To verify the type of configuration on your Cloudimage account, log in to your Cloudimage admin panel and look at the syntax provided on the Welcome page.

[NOTE] If you are an existing Cloudimage customer and wish to be able to remove the v7 from your URL syntax, please contact our support.

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.

Original image

Aspect ratio 3:2 (1.5).

/sample.li/car1.jpg?w=400

Photo alt \#responsive

Aspect ratio crop

Aspect ratio 1.8, image is cropped to match it.

/sample.li/car1.jpg?w=400&aspect_ratio=1.8

Photo alt \#responsive

Crop without resize

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

Original image

Aspect ratio is 1.323.

/sample.li/frog.png

Photo alt \#responsive

Aspect ratio crop

Image is cropped to 1.5-2.0 without scaling.

/sample.li/forg.png?aspect_ratio=1.5

Photo alt \#responsive

Aspect ratio range

You can spcify a range of aspect ratio, for example aspect_ratio=4:3,16:9. Images which fall within this range, will not be cropped. Wider or taller images will be cropped to the closer aspect ratio.

Original image

Aspect ratio 3:2 (1.5).

/sample.li/car1.jpg?w=400

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

Photo alt \#responsive

Original image

Aspect ratio 2.25:1.

/sample.li/kids.jpg?w=400

Photo alt \#responsive

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

Photo alt \#responsive