auto
Enables optimizations based on content negotiation.
The only negotiated optimization currently available is for WebP, an image compression format with limited browser support.
Syntax
auto={value}
Allowed values
Value | Description |
---|---|
webp | If the browser's Accept header indicates compatibility, deliver a WebP image. |
Notes
- Although the WebP format produces images at a higher compression ratio with a lower loss of quality, it is not supported in all browsers.
- When using Firefox version 66 or above, automatic content negotiation will not occur when opening the image in the browser. To view WebP images generated via
auto=webp
you must insert your image onto a web page.
Examples
Click the links to view the transformed image using a demo Fastly IO service.
Example usage | Description |
---|---|
?auto=webp | Deliver lossless (because input image is lossless) WebP where client support is available, otherwise deliver a PNG |
?format=pjpg&auto=webp | Deliver lossy (because format is lossy) WebP where client support is available, otherwise deliver a progressive JPEG |
?format=pjpg&auto=webp | Deliver lossless (because format is lossless) WebP where client support is available, otherwise deliver a PNG |