Appearance
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.tvEndpoint
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 inkey=valueformat
Query parameters:
url(required) — The source image URL (must behttporhttps)
Options
| Option | Type | Values | Default | Description |
|---|---|---|---|---|
w | number | 50, 100–2000 (multiples of 100) | — | Output width in pixels |
h | number | 50, 100–2000 (multiples of 100) | — | Output height in pixels |
fit | string | scaledown, scale, fill, fit, crop | scaledown | Resize mode (see below) |
fillPosition | string | top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right | — | Anchor point for fill and fit modes |
q | number | 10–100 (multiples of 10) | 85 | Output quality (JPEG/WebP) |
f | string | jpg, jpeg, png, gif, webp | source format | Output format |
TIP
The fillPosition is specified inline with fit using a colon separator: fit=fill:center
Fit modes
| Mode | Description |
|---|---|
scaledown | Fit within the given dimensions without enlarging. This is the default. |
scale | Fit within the given dimensions, may enlarge. |
fill | Cover the given dimensions, cropping excess. Use fillPosition to control the anchor. |
fit | Fit within the given dimensions, padding if necessary. Use fillPosition to control alignment. |
crop | Center crop to the given dimensions without resizing. |
Response
Headers:
| Header | Description |
|---|---|
Content-Type | Output image MIME type (image/webp, image/png, etc.) |
Cache-Control | public, max-age=5184000, s-maxage=86400 on success; public, max-age=300 on error |
X-Cache | HIT if served from cache, MISS if freshly processed |
Status codes:
| Code | Description |
|---|---|
200 | Success |
403 | Domain not allowed or private/internal IP detected |
422 | Validation error (invalid options or URL) |
502 | Failed to process the upstream image |
504 | Upstream 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.pngResize 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.pngSmall 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