Skip to main content

Get Image

GET 

/:image-path

This API fetches an image, dynamically formats it, and returns the output image as a response. All query parameters are optional. If no parameters are provided, the original source image is returned.

If using this API to optimize web images on your website, the recommended parameters are:

  • format set to auto
  • width set to your desired image width

Notes about width and height parameters:

  1. If neither values are provided, the output image dimensions will be the same as the source image
  2. If either value is provided, the aspect ratio of the source image will be used to calculate the missing value
  3. If both values are provided, the output image will use the aspect ratio of the source image, cropping the image if needed

Request

Responses

Successful image response