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

ValueDescription
webpIf the browser's Accept header indicates compatibility, deliver a WebP image.

Notes

  1. Although the WebP format produces images at a higher compression ratio with a lower loss of quality, it is not supported in all browsers.
  2. 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 usageDescription
?auto=webpDeliver lossless (because input image is lossless) WebP where client support is available, otherwise deliver a PNG
?format=pjpg&auto=webpDeliver lossy (because format is lossy) WebP where client support is available, otherwise deliver a progressive JPEG
?format=pjpg&auto=webpDeliver lossless (because format is lossless) WebP where client support is available, otherwise deliver a PNG