Skip to content

Image API

The Image API allows for Images to be converted and/or resized on demand. It will check to see if a Variant with the provided properties already exists and if not it will generate one and redirect the browser with a 301.

GET /services/images/v1/<uuid>

Resize an image and/or convert to a web friendly format.

PropertyTypeDescription
behaviorstrDetermines the behavior to use when resizing an image: fill, fit, stretch. By default fit will be used to maintain the images aspect ratio. Note that behavior will only be applied when both a width and height are provided. If only width or height are provided, the image will be resized to dimension while maintaining the original aspect ratio.
formatstrIf provided, the image will be converted from the source format, to the format provided. See Formats below for valid choices.
heightintThe height to resize the image to, between 0 and 20000.
qualityintThe quality to set the image to (when using formats that support quality such as jpg), between 0 and 100.
widthintThe width to resize the image to, between 0 and 20000.

Constants

Resize Behavior

ValueDescription
fillWill resize the image filling the provided width and height. this may result if cropping if the images original aspect ratio is not maintained.
fitWill resize the images to fit within the provided width and height while maintaining the original aspect ratio. This may result in images that are smaller on one edge than the provided width and height.
stretchWill resize the image to fit exactly the provided dimensions. This is likely to result in distortion of the image unless the images aspect ratio is maintained.

Formats

If provided, the image will be converted from the source forma, to the format provided. Valid options are:

ValueDescription
gifGIF (animated GIF's not available via Image API)
jpg, jpgJPEG
jp2, j2k, jpeg2JPEG 2000 (Cannot convert images to JPEG 2000 because they are not web friendly)
pngPNG
tif, tiffTIFF (Cannot convert images to TIFF because they are not web friendly)
webpWEBP

Examples

Convert image from source format to JPEG at the original size:

GET /service/images/v1/00000000-0000-0000-0000-000000000000?format=jpg

Convert image to JPEG and resize to fit bounding box while retaining aspect ratio:

GET /service/images/v1/00000000-0000-0000-0000-000000000000?format=jpg&behavior=fit&width=1000&height=1000

Atlas, Hybrid cloud, on-premesis platform for large scale media program development, delivery and operation.