Skip to content

Assets API Reference

Image Proxy

The image proxy provides on-the-fly image resizing, cropping, and format conversion. It fetches an external image, processes it according to the specified options, and returns the result with appropriate cache headers.

Base URL

https://assets.api.easelive.tv

Endpoint

GET /api/v2/imgproxy/:accountId/:options?url=<imageUrl>

Path parameters:

  • accountId — Your Ease Live account name (lowercase alphanumeric and hyphens)
  • options — Comma-separated processing options in key=value format

Query parameters:

  • url (required) — The source image URL (must be http or https)

Options

OptionTypeValuesDefaultDescription
wnumber50, 100–2000 (multiples of 100)Output width in pixels
hnumber50, 100–2000 (multiples of 100)Output height in pixels
fitstringscaledown, scale, fill, fit, cropscaledownResize mode (see below)
fillPositionstringtop-left, top, top-right, left, center, right, bottom-left, bottom, bottom-rightAnchor point for fill and fit modes
qnumber10–100 (multiples of 10)85Output quality (JPEG/WebP)
fstringjpg, jpeg, png, gif, webpsource formatOutput format

TIP

The fillPosition is specified inline with fit using a colon separator: fit=fill:center

Fit modes

ModeDescription
scaledownFit within the given dimensions without enlarging. This is the default.
scaleFit within the given dimensions, may enlarge.
fillCover the given dimensions, cropping excess. Use fillPosition to control the anchor.
fitFit within the given dimensions, padding if necessary. Use fillPosition to control alignment.
cropCenter crop to the given dimensions without resizing.

Response

Headers:

HeaderDescription
Content-TypeOutput image MIME type (image/webp, image/png, etc.)
Cache-Controlpublic, max-age=5184000, s-maxage=86400 on success; public, max-age=300 on error
X-CacheHIT if served from cache, MISS if freshly processed

Status codes:

CodeDescription
200Success
403Domain not allowed or private/internal IP detected
422Validation error (invalid options or URL)
502Failed to process the upstream image
504Upstream image fetch timed out

Examples

Resize to 200px width, convert to WebP — Open example

GET /api/v2/imgproxy/my-account/w=200,f=webp?url=https://download.easelive.tv/examples/ease-live-logo.png

Resize to 700x200, fill from center, 70% quality — Open example

GET /api/v2/imgproxy/my-account/w=700,h=200,fit=fill:center,q=70?url=https://download.easelive.tv/examples/ease-live-logo.png

Small 50px thumbnail as PNG — Open example

GET /api/v2/imgproxy/my-account/w=50,f=png?url=https://download.easelive.tv/examples/ease-live-logo.png