Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/content/partials/images/quality.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,34 @@ At the moment, this setting only works directly with [image transformations](/im

Specifies quality for images in JPEG, WebP, and AVIF formats. The quality is in a 1-100 scale, but useful values are between `50` (low quality, small file size) and `90` (high quality, large file size). `85` is the default. When using the PNG format, an explicit quality setting allows use of PNG8 (palette) variant of the format.

We also allow setting one of the perceptual quality levels `high|medium-high|medium-low|low`

<Tabs>
<TabItem label="URL format">
```js
quality=50

OR

quality=low
```
</TabItem>
<TabItem label="URL format alias">
```js
q=50

OR

q=medium-high
```
</TabItem>
<TabItem label="Workers">
```js
cf: {image: {quality: 50}}

OR

cf: {image: {quality: "high"}}
```
</TabItem>
</Tabs>
</Tabs>