v1

latestOpenAPI 3.0.02026-07-17407.2 KB
images

Optimises a source image

Optimises an image and returns it in the next-gen format supported by the browser. The API knows about supported formats through the "Accept" header.

get/img/{imgUrl}/optimise

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.

Response

An optimised image

All 4 operations