From 9f76ec5a4cf8f242bf7a105904ffa892197e1ac9 Mon Sep 17 00:00:00 2001 From: Sergey Alexandrovich Date: Wed, 10 Jan 2018 12:59:02 +0600 Subject: [PATCH] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b170afcb..47d08bfe 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ $ xxd -g 2 -l 64 -p /dev/random | tr -d '\n' * `IMGPROXY_CONCURRENCY` — the maximum number of image requests to be processed simultaneously. Default: double number of CPU cores; * `IMGPROXY_MAX_CLIENTS` — the maximum number of simultaneous active connections. Default: `IMGPROXY_CONCURRENCY * 5`; * `IMGPROXY_TTL` — duration in seconds sent in `Expires` and `Cache-Control: max-age` headers. Default: `3600` (1 hour); -* `IMGPROXY_LOCAL_FILESYSTEM_ROOT` — root directory path for serving images from local filesystem via `local:///image.ext`. Default: disabled +* `IMGPROXY_LOCAL_FILESYSTEM_ROOT` — root of the local filesystem. See [Serving local files](#serving-local-files). Keep empty to disable serving of local files. #### Security @@ -216,6 +216,13 @@ Signature is a URL-safe Base64-encoded HMAC digest of the rest of the path inclu You can find helpful code snippets in the `examples` folder. +## Serving local files + +Imgproxy can process files from your local filesystem. To use this feature do the following: + +1. Set `IMGPROXY_LOCAL_FILESYSTEM_ROOT` to your images directory path. +2. Use `local:///path/to/image.jpg` as the source image url. + ## Source image formats support imgproxy supports only the most popular image formats of the moment: PNG, JPEG, GIF and WebP.