---
title: quality
summary: null
url: https://www.fastly.com/documentation/reference/io/quality
---

Output image quality for lossy file formats.

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

## Syntax

```text
quality={value}
quality={value},{autoWebpQuality}
```

`value` may be any integer between 1 and 100, where 1 is a lower quality image and a smaller file and 100 is the highest quality image and larger file. If desired, a second quality level can be specified for use when [auto=webp](https://www.fastly.com/documentation/reference/io/auto) is enabled and a WebP output format has been selected.

For additional information about lossy vs. lossless output, check out the [Image Optimizer reference](https://www.fastly.com/documentation/reference/io/#lossy-vs-lossless-output) page.

## Notes

1. The `quality` parameter can be applied to the following output formats: `avif`, `jpg`, `pjpg`, `png8`, `webp` and `webply`.
2. If no `quality` parameter is present for `jpg`, `pjpg`, or `webp`, the output image will be returned at the default value set in the Image Optimizer [web interface](https://www.fastly.com/documentation/guides/full-site-delivery/image-optimization/about-fastly-image-optimizer/).
3. If [`auto=webp`](https://www.fastly.com/documentation/reference/io/auto) is enabled by the URL or the service settings, the second
   value will be used as the quality value if the requestor sends the `accept: image/webp` request header.
4. When only specifying `quality`, if the output image file size is larger than the input image, the original image will be delivered.
5. This does not include a way of specifying auto AVIF quality.

## Examples

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

| Example usage                                                                                                 | Description                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| [`?quality=85`](https://www.fastly.io/image.jpg?quality=85)                                                   | Output an image with quality set to 85.                                                                                                 |
| [`?format=pjpg&auto=webp&quality=85,75`](https://www.fastly.io/image.jpg?format=pjpg&auto=webp&quality=85,75) | Convert the image format to a progressive jpg with image quality set to 85. For browsers that support WebP set the image quality to 75. |
