Images

Get a download URL for a library image

Returns the unsigned CDN URL of the image with format and dimensions. Pass max_dimension to receive a CDN rendition downscaled to fit that many pixels on the longest side (works for every format). Pass format (jpg, png, webp) to convert the file. max_dimension and format compose. Renditions are generated on the fly by the CDN's image-resizing service (the first generation may require a browser-like client). Requires the images feature.

get/api/v1/images/{id}/download

Request

  • Base URL: https://api.firework.com
  • URL: https://api.firework.com/api/v1/images/{id}/download
  • Auth: OAuth 2 (client credentials, token URL /oauth/token, scopes: images:read)

Path parameters

idstring required

image ID

Query parameters

max_dimensioninteger

Fit the longest side to this many pixels (16-16384, downscale only)

formatstring

Convert to this format (jpg, png, webp)

Response

The download URL and file facts

formatstring nullable

Format of the file at download_url (the requested format when converting)

widthinteger nullable
file_sizeinteger nullable

Size of the original in bytes; null when a resized or converted rendition is returned

download_urlstring nullable required

CDN URL of the original, a resized rendition (when max_dimension is given), a format-converted rendition (when format is given), or both

heightinteger nullable

Changes

No recorded changes to this operation across all 1 revision of this API.