Skip to content

Commit 06b6143

Browse files
committed
Add IMGPROXY_SOURCE_URL_QUERY_SEPARATOR docs
1 parent ce3097f commit 06b6143

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

docs/configuration/options.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,12 @@ imgproxy can be switched into "presets-only mode". In this mode, imgproxy accept
431431

432432
## Image sources
433433

434+
* [`IMGPROXY_SOURCE_URL_QUERY_SEPARATOR`]: a string that will be used as a separator between non-HTTP(S) source URLs' paths and their query strings. When blank, imgproxy won't extract query string from non-HTTP(S) source URLs. Default: `?`
435+
436+
:::tip
437+
If filenames in your S3/Google Cloud Storage/local filesystem/etc may contain `?`, you may want to set `IMGPROXY_SOURCE_URL_QUERY_SEPARATOR` to another string that is not used in filenames or set it to blank to disable query string extraction.
438+
:::
439+
434440
### Local files {#serving-local-files}
435441

436442
imgproxy can serve your local images, but this feature is disabled by default. To enable it, specify your local filesystem root:

docs/image_sources/amazon_s3.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ If you need to specify the version of the source object, you can use the query s
2222
s3://%bucket_name/%file_key?%version_id
2323
```
2424

25+
:::tip
26+
If filenames in your S3 may contain `?`, you may want to set [IMGPROXY_SOURCE_URL_QUERY_SEPARATOR](../configuration/options.mdx#IMGPROXY_SOURCE_URL_QUERY_SEPARATOR) to another string that is not used in filenames or set it to blank to disable query string extraction.
27+
28+
For example, if you set `IMGPROXY_SOURCE_URL_QUERY_SEPARATOR` to `?version=`, you can specify the version like this:
29+
30+
```
31+
s3://%bucket_name/%file_key?version=%version_id
32+
```
33+
:::
34+
2535
### Set up credentials
2636

2737
There are three ways to specify your AWS credentials. The credentials need to have read rights for all of the buckets given in the source URLs:

docs/image_sources/azure_blob_storage.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ imgproxy can process images from Azure Blob Storage containers. To use this feat
1212
4. _(optional)_ Specify the Azure Blob Storage endpoint with `IMGPROXY_ABS_ENDPOINT`
1313
5. Use `abs://%bucket_name/%file_key` as the source image URL
1414

15+
:::tip
16+
If filenames in your Azure Blob Storage may contain `?`, you may want to set [IMGPROXY_SOURCE_URL_QUERY_SEPARATOR](../configuration/options.mdx#IMGPROXY_SOURCE_URL_QUERY_SEPARATOR) to another string that is not used in filenames or set it to blank to disable query string extraction.
17+
:::
18+
1519
## Set up credentials
1620

1721
### Leverage Azure Managed Identity or Service Principal

docs/image_sources/google_cloud_storage.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ If you need to specify generation of the source object, you can use the query st
1717
gs://%bucket_name/%file_key?%generation
1818
```
1919

20+
:::tip
21+
If filenames in your Google Cloud Storage may contain `?`, you may want to set [IMGPROXY_SOURCE_URL_QUERY_SEPARATOR](../configuration/options.mdx#IMGPROXY_SOURCE_URL_QUERY_SEPARATOR) to another string that is not used in filenames or set it to blank to disable query string extraction.
22+
23+
For example, if you set `IMGPROXY_SOURCE_URL_QUERY_SEPARATOR` to `?generation=`, you can specify the generation like this:
24+
25+
```
26+
gs://%bucket_name/%file_key?generation=%generation
27+
```
28+
:::
29+
2030
### Setup credentials
2131

2232
If you run imgproxy inside Google Cloud infrastructure (Compute Engine, Kubernetes Engine, App Engine, and Cloud Functions, etc), and you have granted access to your bucket to the service account, you probably don't need to do anything here. imgproxy will try to use the credentials provided by Google.

docs/image_sources/local_files.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ imgproxy can be configured to process files from your local filesystem. To use t
99
1. Set `IMGPROXY_LOCAL_FILESYSTEM_ROOT` environment variable to your local images directory path.
1010
2. Use `local:///path/to/image.jpg` as the source image URL.
1111

12+
:::tip
13+
If filenames in your local filesystem may contain `?`, you may want to set [IMGPROXY_SOURCE_URL_QUERY_SEPARATOR](../configuration/options.mdx#IMGPROXY_SOURCE_URL_QUERY_SEPARATOR) to another string that is not used in filenames or set it to blank to disable query string extraction.
14+
:::
15+
1216
### Example
1317

1418
Assume you want to process an image that is stored locally at `/path/to/project/images/logos/imgproxy.png`. Run imgproxy with `IMGPROXY_LOCAL_FILESYSTEM_ROOT` set to your images directory:

docs/image_sources/openstack_swift.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ imgproxy can process images from OpenStack Object Storage, also known as Swift.
1616
* `IMGPROXY_SWIFT_DOMAIN`: the Swift domain name (optional, v3 auth only): Default: blank
1717

1818
3. Use `swift://%{container}/%{object_path}` as the source image URL, e.g. an original object storage URL in the format of `/v1/{account}/{container}/{object_path}`, such as `http://127.0.0.1:8080/v1/AUTH_test/images/flowers/rose.jpg`, should be converted to `swift://images/flowers/rose.jpg`.
19+
20+
:::tip
21+
If filenames in your OpenStack Object Storage may contain `?`, you may want to set [IMGPROXY_SOURCE_URL_QUERY_SEPARATOR](../configuration/options.mdx#IMGPROXY_SOURCE_URL_QUERY_SEPARATOR) to another string that is not used in filenames or set it to blank to disable query string extraction.
22+
:::

0 commit comments

Comments
 (0)