mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-01-23 11:14:48 +02:00
Update presets-only mode docs
This commit is contained in:
parent
e071396fd6
commit
a16a1e3141
@ -111,7 +111,6 @@ There are two ways to define presets:
|
||||
##### Using an environment variable
|
||||
|
||||
* `IMGPROXY_PRESETS`: set of preset definitions, comma-divided. Example: `default=resizing_type:fill/enlarge:1,sharp=sharpen:0.7,blurry=blur:2`. Default: blank.
|
||||
* `IMGPROXY_ONLY_PRESETS`: disable all URL formats but presets. In this case, you always need to inform a valid preset. Example: `http://imgproxy.example.com/unsafe/thumbnail/plain/http://example.com/images/curiosity.jpg@png`
|
||||
|
||||
##### Using a command line argument
|
||||
|
||||
@ -131,6 +130,12 @@ sharp=sharpen:0.7
|
||||
blurry=blur:2
|
||||
```
|
||||
|
||||
#### Using only presets
|
||||
|
||||
imgproxy can be switched into "presets-only mode". In this mode, imgproxy accepts only `preset` option arguments as processing options. Example: `http://imgproxy.example.com/unsafe/thumbnail:blurry:watermarked/plain/http://example.com/images/curiosity.jpg@png`
|
||||
|
||||
* `IMGPROXY_ONLY_PRESETS`: disable all URL formats and enable presets-only mode.
|
||||
|
||||
### Serving local files
|
||||
|
||||
imgproxy can serve your local images, but this feature is disabled by default. To enable it, specify your local filesystem root:
|
||||
|
@ -24,8 +24,10 @@ A preset named `default` will be applied to each image. Useful in case you want
|
||||
|
||||
### Only presets
|
||||
|
||||
If you set `IMGPROXY_ONLY_PRESETS` as `true`, a preset is obligatory, and all other URL formats are disabled.
|
||||
Setting `IMGPROXY_ONLY_PRESETS` as `true` switches imgproxy into "presets-only mode". In this mode imgproxy accepts presets list as processing options just like you'd specify them for the `preset` option:
|
||||
|
||||
In this case, you always need to inform a preset in your URLs without the `preset` or `pr` statement. Example: `http://imgproxy.example.com/AfrOrF3gWeDA6VOlDG4TzxMv39O7MXnF4CXpKUwGqRM/thumbnail/aHR0cDovL2V4YW1w/bGUuY29tL2ltYWdl/cy9jdXJpb3NpdHku/anBn.png`
|
||||
```
|
||||
http://imgproxy.example.com/unsafe/thumbnail:blurry:watermarked/plain/http://example.com/images/curiosity.jpg@png
|
||||
```
|
||||
|
||||
It's possible to use more than one preset separing them with `:` like `thumbnail:gray`.
|
||||
All othe URL formats are disabled in this mode.
|
||||
|
Loading…
x
Reference in New Issue
Block a user