v1

latestOpenAPI 3.0.02026-07-17407.2 KB
images

Resizes a source image

Resizes a source image to the specific size, but will always respect aspect ratio. Will apply similar to /optimise optimisations.

Use /fit to resize to the exact given size with ignoring aspect ratio.

get/img/{imgUrl}/resize

Path parameters

imgUrlstring required

Url of the original image including schema. Note that query parameters need to be properly encoded

Query parameters

dppxnumber float

Number of dots per pixel defines the ratio between device and CSS pixels. The query parameter is a hint that enables extra optimisations for high density screens. The format is a float number that's the same format as window.devicePixelRatio.

save-data'off' | 'hide'

Sets an optional behaviour when Save-Data header is "on". When passing "off" value the result image won't use extra compression when data saver mode is on. When passing "hide" value the result image will be an empty 1x1 image. When absent the API will use reduced quality for result images.

trim-borderboolean

Removes the edges of the image that have exactly the same color.

sizestring required

Size of the result image. Should be in the format 'width'x'height', e.g. 200x300 Only width or height could be passed, e.g 200, x300.

Response

A resized image