Hear from Slack, the ACLU, TED, & more at our customer summit in San Francisco Register
LOG IN SIGN UP
Documentation

Quality

Features

Description

The quality parameter enables control over the compression level for lossy file-formatted images.

API Pattern

quality={value}

Parameter

Parameter Description
quality Output image quality for lossy file formats.

Parameter Values

Value Units Description
Integer Percent A whole number between 1 and 100.

Notes

  1. A lower number represents a lower-quality output image with a smaller file size.
  2. A higher number represents a higher-quality output image with a larger file size.
  3. The quality parameter will be ignored by all output formats that are NOT lossy (Currently: GIF and PNG).
  4. If no quality parameter is present, the output image will be returned with a default value of 85.
  5. When only specifying quality; if the output image file size is larger than the input image, the original image will be delivered.

Examples

Description HTML Demo
Deliver at 85% quality - Output and image with 85% compression. <img src="image.jpg?quality=85"/> Example
Advanced Examples (Combining Additional Parameters)
Description HTML Additional Param Demo
Transcode and deliver at 85% quality - Convert the image format to jpg and output and image with 85% compression. <img src="image.png?format=jpg&quality=85"/> format Example