1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-12-09 09:56:01 +02:00
imgproxy/docs/presets.md
Denis Surkov 9fe249d158
Fix typo in presets docs (#1155)
* Fix typo in presets docs

* fix typo x2

* fix typo x3
2023-05-12 19:25:51 +06:00

1.2 KiB

Presets

An imgproxy preset is a named set of processing options. Presets can be used in URLs to make shorter and more human-readable.

Presets definition

A preset definition looks like this:

%preset_name=%processing_options

Processing options should be defined in the same way they are defined in URLs. For example, here's a preset named awesome that sets the resizing type to fill and the resulting format to jpg:

awesome=resizing_type:fill/format:jpg

Read how to specify your presets with imgproxy in the Configuration guide.

Default preset

A preset named default will be applied to each image. This is useful when you want your default processing options to be different from the default imgproxy options.

Only presets

Setting IMGPROXY_ONLY_PRESETS to true switches imgproxy into "presets-only mode". In this mode, imgproxy accepts a presets list as processing options just like you'd specify them for the preset option:

http://imgproxy.example.com/unsafe/thumbnail:blurry:watermarked/plain/http://example.com/images/curiosity.jpg@png

All other URL formats are disabled in this mode.