Home Integrations Image Manipulation API

Image Manipulation API

Last updated on Dec 12, 2023

The Image Manipulation API provides a simple but efficient method of handling images stored in the system, and is integrated together with our content delivery network to ensure the best performance.

width or w

Specifies the width of the image. If not also specifying the height, the image aspect ratio is preserved.


height or h

Specifies the height of the image. If not also specifying the width, the image aspect ratio is preserved.


dpr

The device pixel ratio makes it easier to specify higher DPI sizes. Default is 1.


fit or f

Affects the interpretation of width and hight, and all modes preserve the aspect ratio. Available options:

  • scale-down
    The image will be resized (shrunked) to fit fully within the given width or height.

  • contain
    The image will be resized (shrunked or enlarged) to be as large as possible within the given width/height.

  • cover
    The image will be resized (shrunked or enlarged) to fill the entire width/height, and may be cropped.

  • crop
    The image will be resized (shrunked) and cropped to fit within the area specified by width and height. This mode provides the same result as scale-down if the image is smaller than the given dimentions. For images larger than the given dimentions, it's the same as cover. The image will not be enlarged.


quality or q

Specifies the compression level for images in various formats. The most used values usually range between 50 (low quality, small file size) and 90 (high quality, large file size). Values between 1-100 accepted. Default is 85.


webp

WebP is a modern image format that provides very good lossless and lossy compression for images. This feature is only available for browsers with built in WebP support, but is backwards compatible with old browsers. The feature is enabled by default. To disable, set to off.


sharpen or s

Specifies the strength of the sharpening filter. Values between 1-10 accepted, recommended value is 0.5.


overlay_url or ourl

Specifies the absolute url used for the overlay. It can be any of the accepted file formats, including SVG.


overlay_opacity or oo

Specifies the opacity of the overlay. Values between 0 (transparent) and 1 (opaque) accepted.


overlay_position or op

Specifies the position of the overlay. Accepted values are center, top, bottom, left, right, top-left, top-right, bottom-left and bottom-right. Other positioning options will be ignored if this option is set.


overlay_top or op

Specifies the position of the overlay from the top. This option can't be used together with overlay_bottom.


overlay_bottom or ob

Specifies the position of the overlay from the bottom. This option can't be used together with overlay_top.


overlay_left or ol

Specifies the position of the overlay from the left. This option can't be used together with overlay_right.


overlay_right or or

Specifies the position of the overlay from the right. This option can't be used together with overlay_left.


overlay_rotate

Specifies the degrees to rotate the overlay. Accepted values are 90, 180 and 270.


overlay_repeat

The overlay image will be tiled to cover the entire area. Accepted values are x (tiled horizontally) or y (tiled vertically). It can also partially cover an image, when used together with a positioning value.


signature or sign

A signature is required in order to change any of these options in the URL. The signature should be generated as a sha256 hash, that consists of all the options and their values, together with a secret key available on your account. Requests without a valid signature will return a HTTP 403 Forbidden error.