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/cache/external.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Most major CDNs (Cloudflare, Fastly, AWS CloudFront, Akamai, etc.) can cache img
14
14
15
15
***Image optimization** - Disable CDN image optimization to avoid double-processing
16
16
***Compression** - In case your CDN supports conditional compression of SVG images, enable gzip/Brotli compression for bandwidth savings
17
-
***Include essential headers*** - It's strongly recommended to include `Accept` header in the cache key. If you have client hints enabled, include also `DPR`, `Sec-CH-Dpr`, and `Sec-CH-Width` headers.
17
+
***Include essential headers*** - Include `Accept` header in the cache key if you're using [format negotiation](../configuration/options.mdx#avifwebpjpeg-xl-support-detection). If you have client hints enabled, include also `DPR`, `Sec-CH-Dpr`, and `Sec-CH-Width` headers.
18
18
***Origin shield** - Add a secondary cache layer between your CDN and imgproxy origin if your CDN supports it.
@@ -89,7 +89,7 @@ Use the smallest key that still prevents collisions for your traffic profile.
89
89
90
90
### Key recommendations
91
91
92
-
* Include `Accept` in the cache key if format negotiation is used.
92
+
* Include `Accept` in the cache key if [format negotiation](../configuration/options.mdx#avifwebpjpeg-xl-support-detection) is used.
93
93
* Include DPR/width-related hints in the cache key if [Client Hints](../configuration/options.mdx#client-hints-support) are used to vary output.
94
94
* Set long `inactive` timeout (30d) to keep popular images in cache.
95
95
* Configure `proxy_cache_use_stale` for graceful degradation during origin issues.
@@ -200,8 +200,8 @@ sub vcl_deliver {
200
200
### Key recommendations
201
201
202
202
* Use `sub vcl_hash` to customize cache key behavior.
203
-
* Include `Accept` for format negotiation.
204
-
* Include DPR/width-related headers when they can affect output (`DPR`, `Width`, `Sec-CH-DPR`, `Sec-CH-Width`).
203
+
* Include `Accept` for [format negotiation](../configuration/options.mdx#avifwebpjpeg-xl-support-detection).
204
+
* Include DPR/width-related headers when [Client Hints](../configuration/options.mdx#client-hints-support) support is enabled (`DPR`, `Width`, `Sec-CH-DPR`, `Sec-CH-Width`).
205
205
* Set grace period (`beresp.grace`) for graceful error handling.
206
206
* Monitor Varnish statistics with `varnishstat`.
207
207
* Use tags for efficient cache purging: add `set beresp.http.Surrogate-Key = "images:product:123"` in `vcl_backend_response`.
Copy file name to clipboardExpand all lines: docs/cache/internal.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
@@ -13,7 +13,7 @@ While putting a CDN in front of imgproxy is and will always be a best practice,
13
13
14
14
## Why use internal cache?
15
15
16
-
The internal cache provides long-term persistent storage for processed images, unlike CDNs which typically delete rarely accessed content. It stores images in a single location rather than across multiple edge stores, eliminating cache misses when requests hit different edges. The cache is designed specifically for imgproxy, working seamlessly with features like modern image format detection and client hints support that generic external caches don't understand.
16
+
The internal cache provides long-term persistent storage for processed images, unlike CDNs, which typically delete rarely accessed content. It stores images in a single location rather than across multiple edge stores, eliminating cache misses when requests hit different edges. The cache is designed specifically for imgproxy, working seamlessly with features like modern image format detection and client hints support that generic external caches don't understand by default.
17
17
18
18
The cache is protected by the same security measures as imgproxy itself, including URL signatures and processing restrictions. Importantly, URL signatures are not part of the cache key, so you can rotate keys or use multiple key/salt pairs without invalidating cached images. You maintain full control over where the cache is stored and how it integrates with your infrastructure.
*[`IMGPROXY_PATH_PREFIX`]: the URL path prefix. Example: when set to `/abc/def`, the imgproxy URL will be `/abc/def/%signature/%processing_options/%source_url`. Default: blank
49
49
*[`IMGPROXY_USER_AGENT`]: the User-Agent header that will be sent with the source image request. You can use the `%current_version` variable to insert the current imgproxy version. Default: `imgproxy/%current_version`
50
50
*[`IMGPROXY_USE_ETAG`]: when set to `true`, enables using the [ETag](https://en.wikipedia.org/wiki/HTTP_ETag) HTTP header for HTTP cache control. Default: `false`
51
-
*[`IMGPROXY_ETAG_BUSTER`]: a global ETag buster value. Change this value if you update configuration that affects image processing, to invalidate old ETags and avoid `304 Not Modified` responses from stale client/CDN validators. Default: blank
51
+
*[`IMGPROXY_ETAG_BUSTER`]: a global ETag buster value. Change this value if you update the configuration that affects image processing, to invalidate old ETags and avoid `304 Not Modified` responses from stale client/CDN validators. Default: blank
52
52
*[`IMGPROXY_USE_LAST_MODIFIED`]: when set to `true`, enables using the [Last-Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) HTTP header for HTTP cache control. Default: `false`
53
53
*[`IMGPROXY_LAST_MODIFIED_BUSTER`]: a global `Last-Modified` buster timestamp in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html) format. By setting it to a specific datetime, you can make imgproxy treat all the images as if they were modified at least at that datetime. Default: blank
54
54
*[`IMGPROXY_CUSTOM_REQUEST_HEADERS`]: ((pro)) list of custom headers that imgproxy will send while requesting the source image, divided by `\;` (can be redefined by `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`). Example: `X-MyHeader1=Lorem\;X-MyHeader2=Ipsum`
@@ -435,8 +435,8 @@ imgproxy can classify images by assigning them to predefined categories based on
435
435
*`full`: normalize to [-1, 1] range
436
436
*`imagenet`: normalize using ImageNet mean and standard deviation
437
437
*[`IMGPROXY_CLASSIFICATION_LAYOUT`]: ((pro)) the data layout of the neural network input. Possible values are:
438
-
*`nchw`: channels first (PyTorch default)
439
438
*`nhwc`: _(default)_ channels last (TensorFlow default)
439
+
*`nchw`: channels first (PyTorch default)
440
440
441
441
Read the [Classification guide](../features/classification.mdx) for more info.
442
442
@@ -726,7 +726,7 @@ Check out the [CloudWatch](../monitoring/cloud_watch.mdx) guide to learn more.
726
726
imgproxy can report occurred errors to Bugsnag, Honeybadger and Sentry:
727
727
728
728
*[`IMGPROXY_REPORT_DOWNLOADING_ERRORS`]: when `true`, imgproxy will report downloading errors. Default: `true`
729
-
*[`IMGPROXY_DEVELOPMENT_ERRORS_MODE`]: when `true`, imgproxy will respond with detailed error messages and stack traces in a pretty HTML format. Useful for development and debugging. Default: `false`
729
+
*[`IMGPROXY_DEVELOPMENT_ERRORS_MODE`]: when `true`, imgproxy will respond with detailed error messages and stack traces in a pretty HTML format. Useful for development and debugging. If the client does not `Accept: text/html`, imgproxy reponds with plain text error. Default: `false`
Copy file name to clipboardExpand all lines: docs/features/classification.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
@@ -596,8 +596,8 @@ You need to define the following config variables to enable object classificatio
596
596
Default: `none`
597
597
598
598
*[`IMGPROXY_CLASSIFICATION_LAYOUT`]: the data layout of the neural network input. Possible values:
599
-
*`nchw`: channels first (PyTorch default)
600
599
*`nhwc`: channels last (TensorFlow default)
600
+
*`nchw`: channels first (PyTorch default)
601
601
602
602
Default: `nhwc`
603
603
@@ -615,7 +615,7 @@ car
615
615
616
616
## Getting classification info
617
617
618
-
Object classification is available via the info handler using the `co` (classify objects) endpoint. Fetch classification results by specifying the number of top classes to return:
618
+
Object classification is available via the info handler using the `cl` (classify) endpoint. Fetch classification results by specifying the number of top classes to return:
0 commit comments