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: docs/configuration/options.mdx
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ When cookie forwarding is activated, by default, imgproxy assumes the scope of t
166
166
## Compression
167
167
168
168
*[`IMGPROXY_QUALITY`]: the default quality of the resultant image, percentage. Default: `80`
169
-
*[`IMGPROXY_FORMAT_QUALITY`]: default quality of the resulting image per format, separated by commas. Example: `jpeg=70,avif=40,webp=60`. When a value for the resulting format is not set, the `IMGPROXY_QUALITY` value is used. Default: `avif=65`
169
+
*[`IMGPROXY_FORMAT_QUALITY`]: default quality of the resulting image per format, separated by commas. Example: `jpeg=70,avif=40,webp=60`. When a value for the resulting format is not set, the `IMGPROXY_QUALITY` value is used. Default: `avif=65,jxl=77`
170
170
171
171
### Advanced JPEG compression
172
172
@@ -201,6 +201,10 @@ When cookie forwarding is activated, by default, imgproxy assumes the scope of t
201
201
202
202
*[`IMGPROXY_AVIF_SPEED`]: controls the CPU effort spent improving compression. The lowest speed is at 0 and the fastest is at 9. Default: `9`
203
203
204
+
### Advanced JPEG XL compression
205
+
206
+
*[`IMGPROXY_JXL_EFFORT`]: controls the CPU effort spent improving compression. The larger the value, the slower the encoding process but the better the compression. The value should be between 1 and 9. Default: `4`
207
+
204
208
### Autoquality
205
209
206
210
imgproxy can calculate the quality of the resulting image based on selected metric. Read more in the [Autoquality](../features/autoquality.mdx) guide.
@@ -220,30 +224,37 @@ Autoquality requires the image to be saved several times. Use it only when you p
220
224
*[`IMGPROXY_AUTOQUALITY_JPEG_NET`]: ((pro)) the path to the neural network for JPEG.
221
225
*[`IMGPROXY_AUTOQUALITY_WEBP_NET`]: ((pro)) the path to the neural network for WebP.
222
226
*[`IMGPROXY_AUTOQUALITY_AVIF_NET`]: ((pro)) the path to the neural network for AVIF.
227
+
*[`IMGPROXY_AUTOQUALITY_JXL_NET`]: ((pro)) the path to the neural network for JPEG XL.
223
228
224
229
## SVG processing
225
230
*[`IMGPROXY_SVG_FIX_UNSUPPORTED`]: when `true`, imgproxy will try to replace SVG features unsupported by librsvg to minimize SVG rendering error. This config only takes effect on SVG rasterization. Default: `false`
226
231
*[`IMGPROXY_ALWAYS_RASTERIZE_SVG`]: when `true`, imgproxy will always rasterize SVG images unless SVG processing is not [skipped](#skip-processing). Default: `false`
227
232
228
-
## AVIF/WebP support detection
233
+
## AVIF/WebP/JPEG XL support detection
229
234
230
-
imgproxy can use the `Accept` HTTP header to detect if the browser supports AVIFor WebP and use it as the default format. This feature is disabled by default and can be enabled by the following options:
235
+
imgproxy can use the `Accept` HTTP header to detect if the browser supports AVIF, WebP, or JPEG XL and use it as the default format. This feature is disabled by default and can be enabled by the following options:
231
236
232
237
*[`IMGPROXY_AUTO_WEBP`]: _(deprecated alias: [`IMGPROXY_ENABLE_WEBP_DETECTION`])_ enables WebP support detection. When the file extension is omitted in the imgproxy URL and browser supports WebP, imgproxy will use it as the resulting format.
233
238
*[`IMGPROXY_ENFORCE_WEBP`]: enables WebP support detection and enforces WebP usage. If the browser supports WebP, it will be used as resulting format even if another extension is specified in the imgproxy URL.
234
239
*[`IMGPROXY_AUTO_AVIF`]: _(deprecated alias: [`IMGPROXY_ENABLE_AVIF_DETECTION`])_ enables AVIF support detection. When the file extension is omitted in the imgproxy URL and browser supports AVIF, imgproxy will use it as the resulting format.
235
240
*[`IMGPROXY_ENFORCE_AVIF`]: enables AVIF support detection and enforces AVIF usage. If the browser supports AVIF, it will be used as resulting format even if another extension is specified in the imgproxy URL.
241
+
*[`IMGPROXY_AUTO_JXL`]: enables JPEG XL support detection. When the file extension is omitted in the imgproxy URL and browser supports JPEG XL, imgproxy will use it as the resulting format.
242
+
*[`IMGPROXY_ENFORCE_JXL`]: enables JPEG XL support detection and enforces JPEG XL usage. If the browser supports JPEG XL, it will be used as the resulting format even if another extension is specified in the imgproxy URL.
236
243
237
244
:::info
238
-
imgproxy prefers AVIF over WebP. This means that if both AVIF and WebP detection/enforcement are enabled and the browser supports both of them, AVIF will be used.
245
+
If multiple format detection/enforcement options are enabled, and the browser supports multiple of them, imgproxy will use the format with the highest priority. The priority is as follows (from the highest to the lowest): JPEG XL, AVIF, WebP
239
246
:::
240
247
241
248
:::info
242
249
If both the source and the requested image formats support animation and AVIF detection/enforcement is enabled, AVIF won't be used as AVIF sequence is not supported yet.
243
250
:::
244
251
252
+
:::info
253
+
If both the source and the requested image formats support animation and JPEG XL detection/enforcement is enabled, JPEG XL won't be used as animated JPEG XL is not widely supported by browsers yet.
254
+
:::
255
+
245
256
:::tip
246
-
When AVIF/WebP support detection is enabled, please take care to configure your CDN or caching proxy to take the `Accept` HTTP header into account while caching.
257
+
When AVIF/WebP/JPEG XL support detection is enabled, please take care to configure your CDN or caching proxy to take the `Accept` HTTP header into account while caching.
247
258
:::
248
259
249
260
:::warning
@@ -265,7 +276,7 @@ imgproxy is guided by the following rules when choosing the resulting format:
265
276
5. If none of the preferred formats meet the requirements, the first preferred format is used
266
277
267
278
:::info
268
-
When AVIF/WebPsupport detection is enabled and the browser supports AVIF/WebP, it may be used as the resultant format even if the preferred formats list doesn't contain it.
279
+
When AVIF/WebP/JPEG XL support detection is enabled and the browser supports AVIF/WebP/JPEG XL, it may be used as the resultant format even if the preferred formats list doesn't contain it.
Copy file name to clipboardExpand all lines: docs/features/best_format.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ You can use the `best` value for the [format](../usage/processing.mdx#format) op
10
10
imgproxy measures the complexity of the image to choose when it should use a lossless or near-lossless encoding. Then imgproxy tries to save the image in multiple formats to pick one with the smallest resulting size.
11
11
12
12
:::info
13
-
imgproxy uses only the formats listed as [preferred](../configuration/options.mdx#preferred-formats) when choosing the best format. It may also use AVIFor WebP if [AVIF/WebPsupport detection](../configuration/options.mdx#avifwebp-support-detection) is enabled.
13
+
imgproxy uses only the formats listed as [preferred](../configuration/options.mdx#preferred-formats) when choosing the best format. It may also use AVIF, WebP, or JPEG XL if [AVIF/WebP/JPEG XL support detection](../configuration/options.mdx#avifwebpjpeg-xl-support-detection) is enabled.
14
14
:::
15
15
16
16
:::info
17
-
imgproxy will use AVIFor WebP _only_ if [AVIF/WebPsupport detection](../configuration/options.mdx#avifwebp-support-detection) is enabled.
17
+
imgproxy will use AVIF, WebP, or JPEG XL _only_ if [AVIF/WebP/JPEG XL support detection](../configuration/options.mdx#avifwebpjpeg-xl-support-detection) is enabled.
Copy file name to clipboardExpand all lines: docs/usage/processing.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1168,7 +1168,7 @@ When using an encrypted source URL, you can specify the [extension](#extension)
1168
1168
1169
1169
Extension specifies the format of the resulting image. Read more about image formats support [here](../image_formats_support.mdx).
1170
1170
1171
-
The extension can be omitted. In this case, imgproxy will use the source image format as resulting one. If the source image format is not supported as the resulting image, imgproxy will use `jpg`. You also can [enable AVIFor WebP support detection](../configuration/options.mdx#avifwebp-support-detection) to use it as the default resulting format when possible.
1171
+
The extension can be omitted. In this case, imgproxy will use the source image format as resulting one. If the source image format is not supported as the resulting image, imgproxy will use `jpg`. You also can [enable AVIF, WebP, or JPEG XL support detection](../configuration/options.mdx#avifwebpjpeg-xl-support-detection) to use it as the default resulting format when possible.
0 commit comments