optimize

The optimize parameter automatically applies optimal quality compression to produce an output image with as much visual fidelity as possible, while minimizing the file size.

Syntax

optimize={value}

Allowed values

ValueDescription
lowOutput image quality will be similar to the input image quality.
mediumMore optimization is allowed. We attempt to preserve the visual quality of the input image.
highMinor visual artifacts may be visible. This produces the smallest file.

Notes

  1. Optimize is currently supported by the following output formats: JPEG, WebP.
  2. If the quality parameter is also provided, quality overrides optimize because it is more precise.
  3. Because optimize attempts to produce an output image with as much visual quality as possible while minimizing the file size, the operations applied are subject to change.

Examples

Click the links to view the transformed image using a demo Fastly IO service.

Example usageDescription
?optimize=mediumOutput an image with medium optimization
?optimize=high&auto=webpOutput a highly optimized JPEG. For browsers that support WebP output a highly optimized WebP image.