Skip to content

Commit 7bfbb9f

Browse files
committed
Add IMGPROXY_PRESETS_PATH and IMGPROXY_INFO_PRESETS_PATH docs; Add deprecateion warning for -presets and -info-presets CLI args
1 parent 9ddb711 commit 7bfbb9f

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

docs/configuration/options.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,36 @@ There are two ways to define presets:
453453
* [`IMGPROXY_PRESETS`]: a set of processing preset definitions, comma divided. Example: `default=resizing_type:fill/enlarge:1,sharp=sharpen:0.7,blurry=blur:2`. Default: blank
454454
* [`IMGPROXY_INFO_PRESETS`]: ((pro)) a set of info preset definitions, comma divided. Example: `default=xmp:0/blurhash:4:3`. Default: blank
455455
* [`IMGPROXY_PRESETS_SEPARATOR`]: a string that will be used as a presets' separator. Default: `,`
456+
* [`IMGPROXY_PRESETS_PATH`]: the path to the file with processing preset definitions. Default: blank
457+
458+
The file should contain processing preset definitions, one per line. Lines starting with `#` are treated as comments. Example:
459+
460+
```imgproxy_presets
461+
default=resizing_type:fill/enlarge:1
462+
463+
# Sharpen the image to make it look better
464+
sharp=sharpen:0.7
465+
466+
# Blur the image to hide details
467+
blurry=blur:2
468+
```
469+
* [`IMGPROXY_INFO_PRESETS_PATH`]: ((pro)) the path to the file with info preset definitions. Default: blank
470+
471+
The file should contain info preset definitions, one per line. Lines starting with `#` are treated as comments. Example:
472+
473+
```imgproxy_presets
474+
default=xmp:0/blurhash:4:3
475+
476+
# Detect objects on the image
477+
with_objects=detect_objects:1
478+
```
456479

457480
#### Using a command line argument
458481

482+
:::warning
483+
`-presets` and `-info-presets` command line arguments are deprecated and will be removed in imgproxy v4. Please use `IMGPROXY_PRESETS_PATH` and `IMGPROXY_INFO_PRESETS_PATH` environment variables instead.
484+
:::
485+
459486
```bash
460487
imgproxy -presets /path/to/file/with/presets -info-presets /path/to/file/with/info-presets
461488
```

0 commit comments

Comments
 (0)