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.

Image resizing

Resizing operations allow you to apply various transformations and deliver your images with the desired size. Below is a list of all operations. For more details, click on the respective operation.

Available operations

operationsyntaxdescription
widthwidth=Xsets the image width to X pixels
heightheight=Xsets the image height to X pixels
prevent enlargementorg_if_sml=1prevents resizing if the target size is larger than the origin image
sharper resizingsharp=1useful when creating thumbnails
cropfunc=cropsets crop resize mode
gravity=Xdefines the part of the image to be retained when cropping
X = [north | south][east | west] | auto | X,Y
positionable croptl_px=X,Ysets coordinates of the top left corner of the cropping rectangle
br_px=X,Ysets coordinates of the bottom right corner of the cropping rectangle
face cropfunc=facecrops the image automatically keeping the most prominent face
fitfunc=fitsets fit resize mode
cropfitfunc=cropfitsets crop or fit resize mode depending on the origin and the desired dimensions
boundfunc=boundsets bound resize mode
coverfunc=coversets cover resize mode (distorts image proportions)
flipflip=[h][v]mirrors the image horizontally and/or vertically
rotater=Xrotates the image to X degrees (counterclockwise)
trimtrim=Xtrims a solid-colour border (if present), X is the aggressiveness of the operation
dpidpi=Xsets the resolution when rasterizing vector images
background removal
add-on
bg_remove=1automatically detects the foreground object and isolates it by removing the background of an image using AI

Do not hesitate to contact us if you need any additional operations not listed above.

Resize modes

When you specify both width and height, original image proportions can be either ignored or maintained. Also, you may choose to add padding to the image. Cloudimage provides the following resize modes:

Crop

Keeps image proportions cutting the image to fit the defined width and height.

/sample.li/hotel.jpg?w=400&h=200&func=crop

For more details, see the crop section.

Fit

Resizes the image keeping proportions adding padding to satisfy the desired dimensions.

/sample.li/hotel.jpg?w=400&h=200&func=fit

You can see all padding options in the fit section.

Bound

Tries to resize the image while keeping proportions. Similar to fit but without padding.

/sample.li/hotel.jpg?w=400&h=200&func=bound

For more details, see the bound section.

Cover

Resizes the image to the given width and height ignoring original image proportions.

/sample.li/hotel.jpg?w=400&h=200&func=cover

For more details, see the cover section.

For troubleshooting purposes, you can add the ci_info=1 operation to view details about resizing and compression, example: /sample.li/hotel.jpg?w=400&ci_info=1