1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-04-12 06:58:15 +02:00

Update docs

This commit is contained in:
DarthSim 2022-12-15 21:06:52 +06:00
parent 894cb55cbe
commit 4631fc6951
4 changed files with 75 additions and 75 deletions

View File

@ -44,16 +44,16 @@ echo $(xxd -g 2 -l 64 -p /dev/random | tr -d '\n')
* `IMGPROXY_USER_AGENT`: the User-Agent header that will be sent with the source image request. Default: `imgproxy/%current_version`
* `IMGPROXY_USE_ETAG`: when set to `true`, enables using the [ETag](https://en.wikipedia.org/wiki/HTTP_ETag) HTTP header for HTTP cache control. Default: `false`
* `IMGPROXY_ETAG_BUSTER`: change this to change ETags for all the images. Default: blank
* `IMGPROXY_CUSTOM_REQUEST_HEADERS`: ![pro](/assets/pro.svg) list of custom headers that imgproxy will send while requesting the source image, divided by `\;` (can be redefined by `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`). Example: `X-MyHeader1=Lorem\;X-MyHeader2=Ipsum`
* `IMGPROXY_CUSTOM_RESPONSE_HEADERS`: ![pro](/assets/pro.svg) a list of custom response headers, separated by `\;` (can be redefined by `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`). Example: `X-MyHeader1=Lorem\;X-MyHeader2=Ipsum`
* `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`: ![pro](/assets/pro.svg) a string that will be used as a custom header separator. Default: `\;`
* `IMGPROXY_CUSTOM_REQUEST_HEADERS`: ![pro](./assets/pro.svg) list of custom headers that imgproxy will send while requesting the source image, divided by `\;` (can be redefined by `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`). Example: `X-MyHeader1=Lorem\;X-MyHeader2=Ipsum`
* `IMGPROXY_CUSTOM_RESPONSE_HEADERS`: ![pro](./assets/pro.svg) a list of custom response headers, separated by `\;` (can be redefined by `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`). Example: `X-MyHeader1=Lorem\;X-MyHeader2=Ipsum`
* `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`: ![pro](./assets/pro.svg) a string that will be used as a custom header separator. Default: `\;`
* `IMGPROXY_ENABLE_DEBUG_HEADERS`: when set to `true`, imgproxy will add debug headers to the response. Default: `false`. The following headers will be added:
* `X-Origin-Content-Length`: the size of the source image
* `X-Origin-Width`: the width of the source image
* `X-Origin-Height`: the height of the source image
* `X-Result-Width`: the width of the resultant image
* `X-Result-Height`: the height of the resultant image
* `IMGPROXY_SERVER_NAME`: ![pro](/assets/pro.svg) the `Server` header value. Default: `imgproxy`
* `IMGPROXY_SERVER_NAME`: ![pro](./assets/pro.svg) the `Server` header value. Default: `imgproxy`
## Security
@ -130,11 +130,11 @@ When cookie forwarding is activated, by default, imgproxy assumes the scope of t
### Advanced JPEG compression
* `IMGPROXY_JPEG_PROGRESSIVE`: when true, enables progressive JPEG compression. Default: `false`
* `IMGPROXY_JPEG_NO_SUBSAMPLE`: ![pro](/assets/pro.svg) when true, chrominance subsampling is disabled. This will improve quality at the cost of larger file size. Default: `false`
* `IMGPROXY_JPEG_TRELLIS_QUANT`: ![pro](/assets/pro.svg) when true, enables trellis quantisation for each 8x8 block. Reduces file size but increases compression time. Default: `false`
* `IMGPROXY_JPEG_OVERSHOOT_DERINGING`: ![pro](/assets/pro.svg) when true, enables overshooting of samples with extreme values. Overshooting may reduce ringing artifacts from compression, in particular in areas where black text appears on a white background. Default: `false`
* `IMGPROXY_JPEG_OPTIMIZE_SCANS`: ![pro](/assets/pro.svg) when true, splits the spectrum of DCT coefficients into separate scans. Reduces file size but increases compression time. Requires `IMGPROXY_JPEG_PROGRESSIVE` to be true. Default: `false`
* `IMGPROXY_JPEG_QUANT_TABLE`: ![pro](/assets/pro.svg) quantization table to use. Supported values are:
* `IMGPROXY_JPEG_NO_SUBSAMPLE`: ![pro](./assets/pro.svg) when true, chrominance subsampling is disabled. This will improve quality at the cost of larger file size. Default: `false`
* `IMGPROXY_JPEG_TRELLIS_QUANT`: ![pro](./assets/pro.svg) when true, enables trellis quantisation for each 8x8 block. Reduces file size but increases compression time. Default: `false`
* `IMGPROXY_JPEG_OVERSHOOT_DERINGING`: ![pro](./assets/pro.svg) when true, enables overshooting of samples with extreme values. Overshooting may reduce ringing artifacts from compression, in particular in areas where black text appears on a white background. Default: `false`
* `IMGPROXY_JPEG_OPTIMIZE_SCANS`: ![pro](./assets/pro.svg) when true, splits the spectrum of DCT coefficients into separate scans. Reduces file size but increases compression time. Requires `IMGPROXY_JPEG_PROGRESSIVE` to be true. Default: `false`
* `IMGPROXY_JPEG_QUANT_TABLE`: ![pro](./assets/pro.svg) quantization table to use. Supported values are:
* `0`: Table from JPEG Annex K (default)
* `1`: Flat table
* `2`: Table tuned for MSSIM on Kodak image set
@ -153,12 +153,12 @@ When cookie forwarding is activated, by default, imgproxy assumes the scope of t
<!-- ### Advanced GIF compression
* `IMGPROXY_GIF_OPTIMIZE_FRAMES`: ![pro](/assets/pro.svg) when true, enables GIF frame optimization. This may produce a smaller result, but may increase compression time.
* `IMGPROXY_GIF_OPTIMIZE_TRANSPARENCY`: ![pro](/assets/pro.svg) when true, enables GIF transparency optimization. This may produce a smaller result, but may also increase compression time. -->
* `IMGPROXY_GIF_OPTIMIZE_FRAMES`: ![pro](./assets/pro.svg) when true, enables GIF frame optimization. This may produce a smaller result, but may increase compression time.
* `IMGPROXY_GIF_OPTIMIZE_TRANSPARENCY`: ![pro](./assets/pro.svg) when true, enables GIF transparency optimization. This may produce a smaller result, but may also increase compression time. -->
### Advanced WebP compression
* `IMGPROXY_WEBP_COMPRESSION`: ![pro](/assets/pro.svg) the compression method to use. Supported values are `lossy`, `near_lossless`, and `lossless`. Default: `lossy`
* `IMGPROXY_WEBP_COMPRESSION`: ![pro](./assets/pro.svg) the compression method to use. Supported values are `lossy`, `near_lossless`, and `lossless`. Default: `lossy`
### Advanced AVIF compression
@ -170,17 +170,17 @@ imgproxy can calculate the quality of the resulting image based on selected metr
**⚠️Warning:** Autoquality requires the image to be saved several times. Use it only when you prefer the resulting size and quality over the speed.
* `IMGPROXY_AUTOQUALITY_METHOD`: ![pro](/assets/pro.svg) the method of quality calculation. Default: `none`
* `IMGPROXY_AUTOQUALITY_TARGET`: ![pro](/assets/pro.svg) desired value of the autoquality method metric. Default: 0.02
* `IMGPROXY_AUTOQUALITY_MIN`: ![pro](/assets/pro.svg) minimal quality imgproxy can use. Default: 70
* `IMGPROXY_AUTOQUALITY_FORMAT_MIN`: ![pro](/assets/pro.svg) the minimal quality imgproxy can use per format, comma divided. Example: `jpeg=70,avif=40,webp=60`. When value for the resulting format is not set, `IMGPROXY_AUTOQUALITY_MIN` value is used. Default: `avif=40`
* `IMGPROXY_AUTOQUALITY_MAX`: ![pro](/assets/pro.svg) the maximum quality imgproxy can use. Default: 80
* `IMGPROXY_AUTOQUALITY_FORMAT_MAX`: ![pro](/assets/pro.svg) the maximum quality imgproxy can use per format, comma divided. Example: `jpeg=70,avif=40,webp=60`. When a value for the resulting format is not set, the `IMGPROXY_AUTOQUALITY_MAX` value is used. Default: `avif=50`
* `IMGPROXY_AUTOQUALITY_ALLOWED_ERROR`: ![pro](/assets/pro.svg) the allowed `IMGPROXY_AUTOQUALITY_TARGET` error. Applicable only to `dssim` and `ml` methods. Default: 0.001
* `IMGPROXY_AUTOQUALITY_MAX_RESOLUTION`: ![pro](/assets/pro.svg) when this value is greater then zero and the resultant resolution exceeds the value, autoquality won't be used. Default: 0
* `IMGPROXY_AUTOQUALITY_JPEG_NET`: ![pro](/assets/pro.svg) the path to the neural network for JPEG.
* `IMGPROXY_AUTOQUALITY_WEBP_NET`: ![pro](/assets/pro.svg) the path to the neural network for WebP.
* `IMGPROXY_AUTOQUALITY_AVIF_NET`: ![pro](/assets/pro.svg) the path to the neural network for AVIF.
* `IMGPROXY_AUTOQUALITY_METHOD`: ![pro](./assets/pro.svg) the method of quality calculation. Default: `none`
* `IMGPROXY_AUTOQUALITY_TARGET`: ![pro](./assets/pro.svg) desired value of the autoquality method metric. Default: 0.02
* `IMGPROXY_AUTOQUALITY_MIN`: ![pro](./assets/pro.svg) minimal quality imgproxy can use. Default: 70
* `IMGPROXY_AUTOQUALITY_FORMAT_MIN`: ![pro](./assets/pro.svg) the minimal quality imgproxy can use per format, comma divided. Example: `jpeg=70,avif=40,webp=60`. When value for the resulting format is not set, `IMGPROXY_AUTOQUALITY_MIN` value is used. Default: `avif=40`
* `IMGPROXY_AUTOQUALITY_MAX`: ![pro](./assets/pro.svg) the maximum quality imgproxy can use. Default: 80
* `IMGPROXY_AUTOQUALITY_FORMAT_MAX`: ![pro](./assets/pro.svg) the maximum quality imgproxy can use per format, comma divided. Example: `jpeg=70,avif=40,webp=60`. When a value for the resulting format is not set, the `IMGPROXY_AUTOQUALITY_MAX` value is used. Default: `avif=50`
* `IMGPROXY_AUTOQUALITY_ALLOWED_ERROR`: ![pro](./assets/pro.svg) the allowed `IMGPROXY_AUTOQUALITY_TARGET` error. Applicable only to `dssim` and `ml` methods. Default: 0.001
* `IMGPROXY_AUTOQUALITY_MAX_RESOLUTION`: ![pro](./assets/pro.svg) when this value is greater then zero and the resultant resolution exceeds the value, autoquality won't be used. Default: 0
* `IMGPROXY_AUTOQUALITY_JPEG_NET`: ![pro](./assets/pro.svg) the path to the neural network for JPEG.
* `IMGPROXY_AUTOQUALITY_WEBP_NET`: ![pro](./assets/pro.svg) the path to the neural network for WebP.
* `IMGPROXY_AUTOQUALITY_AVIF_NET`: ![pro](./assets/pro.svg) the path to the neural network for AVIF.
## AVIF/WebP support detection
@ -229,10 +229,10 @@ You can configure imgproxy to skip processing of some formats:
You can use the `best` value for the [format](generating_the_url#format) option or the [extension](generating_the_url#extension) to make imgproxy pick the best format for the resultant image.
* `IMGPROXY_BEST_FORMAT_COMPLEXITY_THRESHOLD `: ![pro](/assets/pro.svg) the image complexity threshold. imgproxy will use a lossless or near-lossless encoding for images with low complexity. Default: `5.5`
* `IMGPROXY_BEST_FORMAT_MAX_RESOLUTION`: ![pro](/assets/pro.svg) when greater than `0` and the image's resolution (in megapixels) is larger than the provided value, imgproxy won't try all the applicable formats and will just pick one that seems the best for the image
* `IMGPROXY_BEST_FORMAT_BY_DEFAULT`: ![pro](/assets/pro.svg) when `true` and the resulting image format is not specified explicitly, imgproxy will use the `best` format instead of the source image format
* `IMGPROXY_BEST_FORMAT_ALLOW_SKIPS`: ![pro](/assets/pro.svg) when `true` and the `best` format is used, imgproxy will skip processing of SVG and formats [listed to skip processing](configuration#skip-processing)
* `IMGPROXY_BEST_FORMAT_COMPLEXITY_THRESHOLD `: ![pro](./assets/pro.svg) the image complexity threshold. imgproxy will use a lossless or near-lossless encoding for images with low complexity. Default: `5.5`
* `IMGPROXY_BEST_FORMAT_MAX_RESOLUTION`: ![pro](./assets/pro.svg) when greater than `0` and the image's resolution (in megapixels) is larger than the provided value, imgproxy won't try all the applicable formats and will just pick one that seems the best for the image
* `IMGPROXY_BEST_FORMAT_BY_DEFAULT`: ![pro](./assets/pro.svg) when `true` and the resulting image format is not specified explicitly, imgproxy will use the `best` format instead of the source image format
* `IMGPROXY_BEST_FORMAT_ALLOW_SKIPS`: ![pro](./assets/pro.svg) when `true` and the `best` format is used, imgproxy will skip processing of SVG and formats [listed to skip processing](configuration#skip-processing)
Check out the [Best format](best_format) guide to learn more.
@ -248,10 +248,10 @@ imgproxy can use the `Width`, `Viewport-Width` or `DPR` HTTP headers to determin
imgproxy Pro can extract specific video frames to create thumbnails. This feature is disabled by default, but can be enabled with `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`.
* `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`: ![pro](/assets/pro.svg) when true, enables video thumbnail generation. Default: `false`
* `IMGPROXY_VIDEO_THUMBNAIL_SECOND`: ![pro](/assets/pro.svg) the timestamp of the frame (in seconds) that will be used for a thumbnail. Default: 1
* `IMGPROXY_VIDEO_THUMBNAIL_PROBE_SIZE`: ![pro](/assets/pro.svg) the maximum amount of bytes used to determine the format. Lower values can decrease memory usage but can produce inaccurate data, or even lead to errors. Default: 5000000
* `IMGPROXY_VIDEO_THUMBNAIL_MAX_ANALYZE_DURATION`: ![pro](/assets/pro.svg) the maximum number of milliseconds used to get the stream info. Lower values can decrease memory usage but can produce inaccurate data, or even lead to errors. When set to 0, the heuristic is used. Default: 0
* `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`: ![pro](./assets/pro.svg) when true, enables video thumbnail generation. Default: `false`
* `IMGPROXY_VIDEO_THUMBNAIL_SECOND`: ![pro](./assets/pro.svg) the timestamp of the frame (in seconds) that will be used for a thumbnail. Default: 1
* `IMGPROXY_VIDEO_THUMBNAIL_PROBE_SIZE`: ![pro](./assets/pro.svg) the maximum amount of bytes used to determine the format. Lower values can decrease memory usage but can produce inaccurate data, or even lead to errors. Default: 5000000
* `IMGPROXY_VIDEO_THUMBNAIL_MAX_ANALYZE_DURATION`: ![pro](./assets/pro.svg) the maximum number of milliseconds used to get the stream info. Lower values can decrease memory usage but can produce inaccurate data, or even lead to errors. When set to 0, the heuristic is used. Default: 0
**⚠️Warning:** Though using `IMGPROXY_VIDEO_THUMBNAIL_PROBE_SIZE` and `IMGPROXY_VIDEO_THUMBNAIL_MAX_ANALYZE_DURATION` can lower the memory footprint of video thumbnail generation, they should be used in production only when you know what you're doing.
@ -261,7 +261,7 @@ imgproxy Pro can extract specific video frames to create thumbnails. This featur
* `IMGPROXY_WATERMARK_PATH`: the path to the locally stored image
* `IMGPROXY_WATERMARK_URL`: the watermark image URL
* `IMGPROXY_WATERMARK_OPACITY`: the watermark's base opacity
* `IMGPROXY_WATERMARKS_CACHE_SIZE`: ![pro](/assets/pro.svg) custom watermarks cache size. When set to `0`, the watermark cache is disabled. 256 watermarks are cached by default.
* `IMGPROXY_WATERMARKS_CACHE_SIZE`: ![pro](./assets/pro.svg) custom watermarks cache size. When set to `0`, the watermark cache is disabled. 256 watermarks are cached by default.
Read more about watermarks in the [Watermark](watermark.md) guide.
@ -269,23 +269,23 @@ Read more about watermarks in the [Watermark](watermark.md) guide.
imgproxy Pro can apply an unsharpening mask to your images.
* `IMGPROXY_UNSHARPENING_MODE`: ![pro](/assets/pro.svg) controls when an unsharpenning mask should be applied. The following modes are supported:
* `IMGPROXY_UNSHARPENING_MODE`: ![pro](./assets/pro.svg) controls when an unsharpenning mask should be applied. The following modes are supported:
* `auto`: _(default)_ apply an unsharpening mask only when an image is downscaled and the `sharpen` option has not been set.
* `none`: the unsharpening mask is not applied.
* `always`: always applies the unsharpening mask.
* `IMGPROXY_UNSHARPENING_WEIGHT`: ![pro](/assets/pro.svg) a floating-point number that defines how neighboring pixels will affect the current pixel. The greater the value, the sharper the image. This value should be greater than zero. Default: `1`
* `IMGPROXY_UNSHARPENING_DIVIDOR`: ![pro](/assets/pro.svg) a floating-point number that defines the unsharpening strength. The lesser the value, the sharper the image. This value be greater than zero. Default: `24`
* `IMGPROXY_UNSHARPENING_WEIGHT`: ![pro](./assets/pro.svg) a floating-point number that defines how neighboring pixels will affect the current pixel. The greater the value, the sharper the image. This value should be greater than zero. Default: `1`
* `IMGPROXY_UNSHARPENING_DIVIDOR`: ![pro](./assets/pro.svg) a floating-point number that defines the unsharpening strength. The lesser the value, the sharper the image. This value be greater than zero. Default: `24`
## Object detection
imgproxy can detect objects on the image and use them to perform smart cropping, to blur the detections, or to draw the detections.
* `IMGPROXY_OBJECT_DETECTION_CONFIG`: ![pro](/assets/pro.svg) the path to the neural network config. Default: blank
* `IMGPROXY_OBJECT_DETECTION_WEIGHTS`: ![pro](/assets/pro.svg) the path to the neural network weights. Default: blank
* `IMGPROXY_OBJECT_DETECTION_CLASSES`: ![pro](/assets/pro.svg) the path to the text file with the classes names, one per line. Default: blank
* `IMGPROXY_OBJECT_DETECTION_NET_SIZE`: ![pro](/assets/pro.svg) the size of the neural network input. The width and the heights of the inputs should be the same, so this config value should be a single number. Default: 416
* `IMGPROXY_OBJECT_DETECTION_CONFIDENCE_THRESHOLD`: ![pro](/assets/pro.svg) detections with confidences below this value will be discarded. Default: 0.2
* `IMGPROXY_OBJECT_DETECTION_NMS_THRESHOLD`: ![pro](/assets/pro.svg) non-max supression threshold. Don't change this if you don't know what you're doing. Default: 0.4
* `IMGPROXY_OBJECT_DETECTION_CONFIG`: ![pro](./assets/pro.svg) the path to the neural network config. Default: blank
* `IMGPROXY_OBJECT_DETECTION_WEIGHTS`: ![pro](./assets/pro.svg) the path to the neural network weights. Default: blank
* `IMGPROXY_OBJECT_DETECTION_CLASSES`: ![pro](./assets/pro.svg) the path to the text file with the classes names, one per line. Default: blank
* `IMGPROXY_OBJECT_DETECTION_NET_SIZE`: ![pro](./assets/pro.svg) the size of the neural network input. The width and the heights of the inputs should be the same, so this config value should be a single number. Default: 416
* `IMGPROXY_OBJECT_DETECTION_CONFIDENCE_THRESHOLD`: ![pro](./assets/pro.svg) detections with confidences below this value will be discarded. Default: 0.2
* `IMGPROXY_OBJECT_DETECTION_NMS_THRESHOLD`: ![pro](./assets/pro.svg) non-max supression threshold. Don't change this if you don't know what you're doing. Default: 0.4
## Fallback image
@ -296,7 +296,7 @@ You can set up a fallback image that will be used in case imgproxy is unable to
* `IMGPROXY_FALLBACK_IMAGE_URL`: the fallback image URL
* `IMGPROXY_FALLBACK_IMAGE_HTTP_CODE`: the HTTP code for the fallback image response. When set to zero, imgproxy will respond with the usual HTTP code. Default: `200`
* `IMGPROXY_FALLBACK_IMAGE_TTL`: a duration (in seconds) sent via the `Expires` and `Cache-Control: max-age` HTTP headers when a fallback image was used. When blank or `0`, the value from `IMGPROXY_TTL` is used.
* `IMGPROXY_FALLBACK_IMAGES_CACHE_SIZE`: ![pro](/assets/pro.svg) the size of custom fallback images cache. When set to `0`, the fallback image cache is disabled. 256 fallback images are cached by default.
* `IMGPROXY_FALLBACK_IMAGES_CACHE_SIZE`: ![pro](./assets/pro.svg) the size of custom fallback images cache. When set to `0`, the fallback image cache is disabled. 256 fallback images are cached by default.
## Presets
@ -514,5 +514,5 @@ imgproxy can send logs to syslog, but this feature is disabled by default. To en
* `IMGPROXY_ENFORCE_THUMBNAIL`: when `true` and the source image has an embedded thumbnail, imgproxy will always use the embedded thumbnail instead of the main image. Currently, only thumbnails embedded in `heic` and `avif` are supported. Default: `false`
* `IMGPROXY_RETURN_ATTACHMENT`: when `true`, response header `Content-Disposition` will include `attachment`. Default: `false`
* `IMGPROXY_SVG_FIX_UNSUPPORTED`: when `true`, imgproxy will try to replace SVG features unsupported by librsvg to minimize SVG rendering error. This config only takes effect on SVG rasterization. Default: `false`
* `IMGPROXY_HEALTH_CHECK_MESSAGE`: ![pro](/assets/pro.svg) the content of the health check response. Default: `imgproxy is running`
* `IMGPROXY_HEALTH_CHECK_MESSAGE`: ![pro](./assets/pro.svg) the content of the health check response. Default: `imgproxy is running`
* `IMGPROXY_HEALTH_CHECK_PATH`: an additional path of the health check. Default: blank

View File

@ -62,7 +62,7 @@ Defines how imgproxy will resize the source image. Supported resizing types are:
Default: `fit`
### Resizing algorithm![pro](/assets/pro.svg) :id=resizing-algorithm
### Resizing algorithm![pro](./assets/pro.svg) :id=resizing-algorithm
```
resizing_algorithm:%algorithm
@ -200,7 +200,7 @@ Default: `ce:0:0`
**Special gravities**:
* `gravity:sm`: smart gravity. `libvips` detects the most "interesting" section of the image and considers it as the center of the resulting image. Offsets are not applicable here.
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ![pro](/assets/pro.svg) object-oriented gravity. imgproxy [detects objects](object_detection.md) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
* `gravity:obj:%class_name1:%class_name2:...:%class_nameN`: ![pro](./assets/pro.svg) object-oriented gravity. imgproxy [detects objects](object_detection.md) of provided classes on the image and calculates the resulting image center using their positions. If class names are omited, imgproxy will use all the detected objects.
* `gravity:fp:%x:%y`: the gravity focus point . `x` and `y` are floating point numbers between 0 and 1 that define the coordinates of the center of the resulting image. Treat 0 and 1 as right/left for `x` and top/bottom for `y`.
### Crop
@ -296,7 +296,7 @@ With no arguments provided, disables any background manipulations.
Default: disabled
### Background alpha![pro](/assets/pro.svg) :id=background-alpha
### Background alpha![pro](./assets/pro.svg) :id=background-alpha
```
background_alpha:%alpha
@ -307,7 +307,7 @@ Adds an alpha channel to `background`. The value of `alpha` is a positive floati
Default: 1
### Adjust![pro](/assets/pro.svg) :id=adjust
### Adjust![pro](./assets/pro.svg) :id=adjust
```
adjust:%brightness:%contrast:%saturation
@ -316,7 +316,7 @@ a:%brightness:%contrast:%saturation
This is a meta-option that defines the [brightness](#brightness), [contrast](#contrast), and [saturation](#saturation). All arguments are optional and can be omitted to use their default values.
### Brightness![pro](/assets/pro.svg) :id=brightness
### Brightness![pro](./assets/pro.svg) :id=brightness
```
brightness:%brightness
@ -327,7 +327,7 @@ When set, imgproxy will adjust brightness of the resulting image. `brightness` i
Default: 0
### Contrast![pro](/assets/pro.svg) :id=contrast
### Contrast![pro](./assets/pro.svg) :id=contrast
```
contrast:%contrast
@ -338,7 +338,7 @@ When set, imgproxy will adjust the contrast of the resulting image. `contrast` i
Default: 1
### Saturation![pro](/assets/pro.svg) :id=saturation
### Saturation![pro](./assets/pro.svg) :id=saturation
```
saturation:%saturation
@ -384,7 +384,7 @@ When set, imgproxy will apply the pixelate filter to the resulting image. The va
Default: disabled
### Unsharpening![pro](/assets/pro.svg) :id=unsharpening
### Unsharpening![pro](./assets/pro.svg) :id=unsharpening
```
unsharpening:%mode:%weight:%dividor
@ -393,7 +393,7 @@ ush:%mode:%weight:%dividor
Allows redefining unsharpening options. All arguments have the same meaning as [Unsharpening](configuration.md#unsharpening) configs. All arguments are optional and can be omitted.
### Blur detections![pro](/assets/pro.svg) :id=blur-detections
### Blur detections![pro](./assets/pro.svg) :id=blur-detections
```
blur_detections:%sigma:%class_name1:%class_name2:...:%class_nameN
@ -404,7 +404,7 @@ imgproxy [detects objects](object_detection.md) of the provided classes and blur
The value of `sigma` defines the size of the mask imgproxy will use.
### Draw detections![pro](/assets/pro.svg) :id=draw-detections
### Draw detections![pro](./assets/pro.svg) :id=draw-detections
```
draw_detections:%draw:%class_name1:%class_name2:...:%class_nameN
@ -413,7 +413,7 @@ dd:%draw:%class_name1:%class_name2:...:%class_nameN
When `draw` is set to `1`, `t` or `true`, imgproxy [detects objects](object_detection.md) of the provided classes and draws their bounding boxes. If class names are omitted, imgproxy draws the bounding boxes of all the detected objects.
### Gradient![pro](/assets/pro.svg) :id=gradient
### Gradient![pro](./assets/pro.svg) :id=gradient
```
gradient:%opacity:%color:%direction:%start%stop
@ -457,7 +457,7 @@ Places a watermark on the processed image.
Default: disabled
### Watermark URL![pro](/assets/pro.svg) :id=watermark-url
### Watermark URL![pro](./assets/pro.svg) :id=watermark-url
```
watermark_url:%url
@ -468,7 +468,7 @@ When set, imgproxy will use the image from the specified URL as a watermark. `ur
Default: blank
### Watermark text![pro](/assets/pro.svg) :id=watermark-text
### Watermark text![pro](./assets/pro.svg) :id=watermark-text
```
watermark_text:%text
@ -483,7 +483,7 @@ If you want to use a custom font, you need to put it in `/usr/share/fonts` insid
Default: blank
### Watermark Size![pro](/assets/pro.svg) :id=watermark-size
### Watermark Size![pro](./assets/pro.svg) :id=watermark-size
```
watermark_size:%width:%height
@ -500,7 +500,7 @@ When `%height` is set to `0`, imgproxy will calculate the height using the defin
Default: `0:0`
### Watermark Shadow![pro](/assets/pro.svg) :id=watermark-shadow
### Watermark Shadow![pro](./assets/pro.svg) :id=watermark-shadow
```
watermark_shadow:%sigma
@ -510,7 +510,7 @@ When set, imgproxy will add a shadow to the watermark. The value of `sigma` defi
Default: disabled
### Style![pro](/assets/pro.svg) :id=style
### Style![pro](./assets/pro.svg) :id=style
```
style:%style
@ -577,7 +577,7 @@ fq:%format1:%quality1:%format2:%quality2:...:%formatN:%qualityN
Adds or redefines `IMGPROXY_FORMAT_QUALITY` values.
### Autoquality![pro](/assets/pro.svg) :id=autoquality
### Autoquality![pro](./assets/pro.svg) :id=autoquality
```
autoquality:%method:%target:%min_quality:%max_quality:%allowed_error
@ -603,7 +603,7 @@ When set, imgproxy automatically degrades the quality of the image until the ima
Default: 0
### JPEG options![pro](/assets/pro.svg) :id=jpeg-options
### JPEG options![pro](./assets/pro.svg) :id=jpeg-options
```
jpeg_options:%progressive:%no_subsample:%trellis_quant:%overshoot_deringing:%optimize_scans:%quant_table
@ -612,7 +612,7 @@ jpgo:%progressive:%no_subsample:%trellis_quant:%overshoot_deringing:%optimize_sc
Allows redefining JPEG saving options. All arguments have the same meaning as the [Advanced JPEG compression](configuration.md#advanced-jpeg-compression) configs. All arguments are optional and can be omitted.
### PNG options![pro](/assets/pro.svg) :id=png-options
### PNG options![pro](./assets/pro.svg) :id=png-options
```
png_options:%interlaced:%quantize:%quantization_colors
@ -621,7 +621,7 @@ pngo:%interlaced:%quantize:%quantization_colors
Allows redefining PNG saving options. All arguments have the same meaning as with the [Advanced PNG compression](configuration.md#advanced-png-compression) configs. All arguments are optional and can be omitted.
<!-- ### GIF options![pro](/assets/pro.svg) :id=gif-options
<!-- ### GIF options![pro](./assets/pro.svg) :id=gif-options
```
gif_options:%optimize_frames:%optimize_transparency
@ -630,7 +630,7 @@ gifo:%optimize_frames:%optimize_transparency
Allows redefining GIF saving options. All arguments have the same meaning as with the [Advanced GIF compression](configuration.md#advanced-gif-compression) configs. All arguments are optional and can be omitted. -->
### WebP options![pro](/assets/pro.svg) :id=webp-options
### WebP options![pro](./assets/pro.svg) :id=webp-options
```
webp_options:%compression
@ -651,7 +651,7 @@ Specifies the resulting image format. Alias for the [extension](#extension) part
Default: `jpg`
### Page![pro](/assets/pro.svg) :id=page
### Page![pro](./assets/pro.svg) :id=page
```
page:%page
@ -662,7 +662,7 @@ When a source image supports pagination (PDF, TIFF) or animation (GIF, WebP), th
Default: 0
### Disable animation![pro](/assets/pro.svg) :id=disable-animation
### Disable animation![pro](./assets/pro.svg) :id=disable-animation
```
disable_animation:%disable
@ -673,7 +673,7 @@ When set to `1`, `t` or `true`, imgproxy will use a single frame of animated ima
Default: `false`
### Video thumbnail second![pro](/assets/pro.svg) :id=video-thumbnail-second
### Video thumbnail second![pro](./assets/pro.svg) :id=video-thumbnail-second
```
video_thumbnail_second:%second
@ -682,7 +682,7 @@ vts:%second
Allows redefining `IMGPROXY_VIDEO_THUMBNAIL_SECOND` config.
### Fallback image URL![pro](/assets/pro.svg) :id=fallback-image-url
### Fallback image URL![pro](./assets/pro.svg) :id=fallback-image-url
You can use a custom fallback image by specifying its URL with the `fallback_image_url` processing option:
@ -833,7 +833,7 @@ Extension specifies the format of the resulting image. Read more about image for
The extension can be omitted. In this case, imgproxy will use the source image format as resulting one. If the source image format is not supported as the resulting image, imgproxy will use `jpg`. You also can [enable WebP support detection](configuration.md#avifwebp-support-detection) to use it as the default resulting format when possible.
### Best format![pro](/assets/pro.svg)
### Best format![pro](./assets/pro.svg)
You can use the `best` value for the [format](generating_the_url#format) option or the [extension](generating_the_url#extension) to make imgproxy pick the best format for the resultant image. Check out the [Best format](best_format) guide to learn more.

View File

@ -14,9 +14,9 @@ At the moment, imgproxy supports only the most popular image formats:
| HEIC | `heic` | Yes | No |
| BMP | `bmp` | Yes | Yes |
| TIFF | `tiff` | Yes | Yes |
| PDF ![pro](/assets/pro.svg) | `pdf` | Yes | No |
| MP4 (h264) ![pro](/assets/pro.svg) | `mp4` | [See notes](#video-thumbnails) | Yes |
| Other video formats ![pro](/assets/pro.svg) | | [See notes](#video-thumbnails) | No |
| PDF ![pro](./assets/pro.svg) | `pdf` | Yes | No |
| MP4 (h264) ![pro](./assets/pro.svg) | `mp4` | [See notes](#video-thumbnails) | Yes |
| Other video formats ![pro](./assets/pro.svg) | | [See notes](#video-thumbnails) | No |
## SVG support
@ -36,13 +36,13 @@ Since the processing of animated images is a pretty heavy process, only one fram
**📝Note:** imgproxy summarizes all frames resolutions while the checking source image resolution.
## Converting animated images to MP4![pro](/assets/pro.svg) :id=converting-animated-images-to-mp4
## Converting animated images to MP4![pro](./assets/pro.svg) :id=converting-animated-images-to-mp4
Animated image results can be converted to MP4 by specifying the `mp4` extension.
Since MP4 requires use of a `<video>` tag instead of `<img>`, automatic conversion to MP4 is not provided.
## Video thumbnails![pro](/assets/pro.svg) :id=video-thumbnails
## Video thumbnails![pro](./assets/pro.svg) :id=video-thumbnails
If you provide a video as a source, imgproxy takes a specific frame to create a thumbnail. To do this, imgproxy downloads only the amount of data required to reach the needed frame.

View File

@ -43,7 +43,7 @@ The available arguments are:
* `x_offset`, `y_offset` - (optional) specify watermark offset by X and Y axes. When using `re` position, these values define the spacing between the tiles.
* `scale` - (optional) a floating point number that defines the watermark size relative to the resulting image size. When set to `0` or omitted, the watermark size won't be changed.
## Custom watermarks![pro](/assets/pro.svg) :id=custom-watermarks
## Custom watermarks![pro](./assets/pro.svg) :id=custom-watermarks
You can use a custom watermark by specifying its URL with the `watermark_url` processing option: