Comment on page
Optimise
API endpoint -
/api/2/img/[IMAGE-URL]/optimise
Optimise - optimises images using lossy compression automatically.
dppx (optional) - 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 in the same format as window.devicePixelRatio.
dppx=2
- sending a hint to the API that screen has DPI=2
Parameters | Image |
---|---|
Original | ![]() |
No parameters | ![]() |
dppx=2 | ![]() |
You can see URL of the examples by "right-click -> Copy Image address"
Last modified 11mo ago