Format and quality
The Media Delivery API lets you set the output format explicitly, or let fmt=auto serve the best format each browser supports. Compression can be set for a single request, per format, or left to the defaults configured for your account.
Base URL pattern
The parameters on this page are appended to a Dynamic Media image URL. For the URL pattern and how parameters chain together, see the Media Delivery API guide.
Verifying format and quality changes
Most parameters in this section change the encoded file rather than its on-screen appearance, so an interactive preview would look identical before and after. To verify them, open the generated URL in a new tab and check the response Content-Type header and transfer size in your browser's developer tools (Network tab). For more detail on how to find this information, see the Amplience Smart Images example.
qlt — QualityLink copied!
Sets the compression quality as a percentage (0–100). JPEG is lossy; PNG is lossless but zlib-compressed.
This example pins fmt=jpg and a 500px output so compression artefacts are visible at preview size. Switch the format to png and the image stops changing - on PNG output, qlt affects file size but not appearance.
fmt — Output formatLink copied!
Sets the output format. If not specified, the format matches the original. Setting the image file extension also changes the format.
Supported values: jpg, png, gif, bmp, webp, avif, jp2
Note
webpis not supported in all browsers. See browser support.jp2is supported in Safari for iOS and macOS only.avifrequires Accelerated Media. Images larger than 2.5 megapixels fall back tojpeg(orpngif transparency is present).
Example:
fmt=auto — Auto formatLink copied!
Returns the image in the most efficient format supported by the requesting browser.
Info
This feature, and avif support, requires Accelerated Media.
Format selection priority:
avif- if enabled on your account and supported by the browserwebp- for Safari, Chrome, Firefox and other browsers that support itjp2- for Safari versions that supportjp2but notwebpjpg- fallback for all other browserspng- if the original image contains transparency and the browser is Safari
Example:
For more information, see Amplience Smart Images.
qlt=default — Default format qualityLink copied!
Applies the platform default quality setting for the output format. Can be combined with fmt=auto.
Default quality values by format:
| Format | Default quality |
|---|---|
jp2 | 40 |
avif | 55 |
webp | 80 |
jpeg | 75 |
png | 90 |
Custom defaults can be set in your account root template or transformation templates.
Example:
Per-format quality parametersLink copied!
Sets the compression quality for a specific output format. Can be combined with fmt=auto.
| Parameter | Format |
|---|---|
fmt.avif.qlt | AVIF |
fmt.webp.qlt | WebP |
fmt.jp2.qlt | JPEG 2000 |
fmt.jpeg.qlt | JPEG |
fmt.png.qlt | PNG |
Example:
dpi - Dots per inchLink copied!
Changes the image resolution. If not specified, the image is returned at its original DPI.
Example:
dpiFilter - DPI resampling algorithmLink copied!
Specifies the resampling algorithm used when the DPI is changed.
| Value | Description |
|---|---|
q | Quadratic |
s | Sinc |
l | Lanczos (default) |
p | Point |
c | Cubic |
Example:
strip - Strip metadataLink copied!
Removes commands and metadata from the image. Accepts true or false. Default is false.
Example:
fmt.jpeg.chroma - Chroma subsamplingLink copied!
Controls JPEG chroma subsampling, which reduces file size by sampling colour at a lower rate than brightness.
| Value | Description |
|---|---|
2,1,1 | Enabled (default) |
1,1,1 | Disabled |
Disabling chroma subsampling increases file size; consider reducing qlt to compensate.
Example:
fmt.jpeg.interlaced - Progressive JPEGLink copied!
Add fmt.jpeg.interlaced=true to a JPEG URL to return the image as a progressive JPEG. Progressive JPEGs load a low-quality version of the whole image first and refine it as more data downloads, rather than rendering top-to-bottom.
The effect is only observable while the file is downloading - on a fast connection the image simply appears complete, so there is nothing useful to preview here. To see it in action, apply the parameter to a large JPEG and load it with network throttling enabled in your browser's developer tools.
See the progressive images guide for more information.
PNG output optionsLink copied!
Control how PNG output is encoded. All three parameters affect file size rather than on-screen appearance.
| Parameter | Values | Description |
|---|---|---|
fmt.png.indexed | true / false | Use an indexed colour palette rather than per-pixel colour data. Default: false. |
fmt.png.palettesize | 1–256 | Colour palette size for indexed PNGs. Requires fmt.png.indexed=true. Default: 256. |
fmt.png.dither | true / false | Dithering for indexed PNGs. Smooths colour banding but may slightly increase file size. Default: true. |
Example: