Last updated May 18, 2020

    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.

    API Pattern



    Parameter Description
    optimize Automatically applies optimal quality compression.

    Parameter Values

    Value Description
    low Output image quality will be similar to the input image quality.
    medium More optimization is allowed. We attempt to preserve the visual quality of the input image.
    high Minor visual artifacts may be visible. This produces the smallest file.


    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.


    Description HTML Demo
    Output an image with medium optimization. <img src="image.jpg?optimize=medium"/> Example
    Advanced Examples (Combining Additional Parameters)
    Description HTML Demo
    Output a highly optimized JPEG. For browsers that support WebP output a highly optimized WebP image. <img src="image.jpg?optimize=high&auto=webp"/> Example
    Back to Top