You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/partials/images/format.mdx
+10-13Lines changed: 10 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,18 @@
1
1
---
2
2
{}
3
3
---
4
-
import { Tabs, TabItem } from"~/components"
5
4
6
-
:::note[Note]
7
-
At the moment, this setting only works directly with [image transformations](/images/transform-images/).
8
-
:::
5
+
import { Tabs, TabItem } from"~/components";
9
6
10
7
The `auto` option will serve the WebP or AVIF format to browsers that support it. If this option is not specified, a standard format like JPEG or PNG will be used. Cloudflare will default to JPEG when possible due to the large size of PNG files.
11
8
12
9
Workers integration supports:
13
10
14
-
*`avif`: Generate images in AVIF format if possible (with WebP as a fallback).
15
-
*`webp`: Generate images in Google WebP format. Set the quality to `100` to get the WebP lossless format.
16
-
*`jpeg`: Generate images in interlaced progressive JPEG format, in which data is compressed in multiple passes of progressively higher detail.
17
-
*`baseline-jpeg`: Generate images in baseline sequential JPEG format. It should be used in cases when target devices don't support progressive JPEG or other modern file formats.
18
-
*`json`: Instead of generating an image, outputs information about the image in JSON format. The JSON object will contain data such as image size (before and after resizing), source image's MIME type, and file size.
11
+
-`avif`: Generate images in AVIF format if possible (with WebP as a fallback).
12
+
-`webp`: Generate images in Google WebP format. Set the quality to `100` to get the WebP lossless format.
13
+
-`jpeg`: Generate images in interlaced progressive JPEG format, in which data is compressed in multiple passes of progressively higher detail.
14
+
-`baseline-jpeg`: Generate images in baseline sequential JPEG format. It should be used in cases when target devices don't support progressive JPEG or other modern file formats.
15
+
-`json`: Instead of generating an image, outputs information about the image in JSON format. The JSON object will contain data such as image size (before and after resizing), source image's MIME type, and file size.
At the moment, this setting only works directly with [image transformations](/images/transform-images/) and does not support resizing with Cloudflare Workers.
8
+
This setting only works directly with [image transformations](/images/transform-images/) and does not support resizing with Cloudflare Workers.
8
9
:::
9
10
10
11
In case of a [fatal error](/images/reference/troubleshooting/#error-responses-from-resizing) that prevents the image from being resized, redirects to the unresized source image URL. This may be useful in case some images require user authentication and cannot be fetched anonymously via Worker. This option should not be used if there is a chance the source image is very large. This option is ignored if the image is from another domain, but you can use it with subdomains.
At the moment, this setting only works directly with [image transformations](/images/transform-images/).
8
-
:::
5
+
import { Tabs, TabItem } from"~/components";
9
6
10
7
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. Use the `format=auto` option to allow use of WebP and AVIF formats.
11
8
@@ -25,18 +22,20 @@ We also allow setting one of the perceptual quality levels `high|medium-high|med
0 commit comments