1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-03-22 20:21:28 +02:00

Update docs and changelog

This commit is contained in:
DarthSim 2021-10-01 16:26:12 +06:00
parent 9eca8a4e70
commit 893d6e1c90
14 changed files with 107 additions and 74 deletions

@ -6,6 +6,7 @@
- (pro) [Object detection](https://docs.imgproxy.net/object_detection): `obj` [gravity](https://docs.imgproxy.net/generating_the_url?id=gravity) type, [blur_detections](https://docs.imgproxy.net/generating_the_url?id=blur-detections) processing option, [draw_detections](https://docs.imgproxy.net/generating_the_url?id=draw-detections) processing option.
- (pro) [Chained pipelines](https://docs.imgproxy.net/chained_pipelines)
- `IMGPROXY_FALLBACK_IMAGE_HTTP_CODE` config.
- [fallback_image_url](https://docs.imgproxy.net/generating_the_url?id=fallback-image-url) processing option.
- [expires](https://docs.imgproxy.net/generating_the_url?id=expires) processing option.
- [skip processing](https://docs.imgproxy.net/generating_the_url?id=skip-processing) processing option.
- [Datadog](./docs/datadog.md) metrics.

@ -2,18 +2,20 @@
* [Installation](installation)
* [Configuration](configuration)
* [Generating the URL](generating_the_url)
* [Getting the image info <img class='pro-badge' src='assets/pro.svg' alt='pro' />](getting_the_image_info)
* [Getting the image info<i class='badge badge-pro'></i>](getting_the_image_info)
* [Signing the URL](signing_the_url)
* [Watermark](watermark)
* [Presets](presets)
* [Chained pipelines <img class='pro-badge' src='assets/pro.svg' alt='pro' />](chained_pipelines)
* [Object detection<i class='badge badge-pro'></i><i class='badge badge-v3'></i>](object_detection)
* [Autoquality<i class='badge badge-pro'></i><i class='badge badge-v3'></i>](autoquality)
* [Chained pipelines<i class='badge badge-pro'></i><i class='badge badge-v3'></i>](chained_pipelines)
* [Serving local files](serving_local_files)
* [Serving files from Amazon S3](serving_files_from_s3)
* [Serving files from Google Cloud Storage](serving_files_from_google_cloud_storage)
* [Serving files from Azure Blob Storage](serving_files_from_azure_blob_storage.md)
* [New Relic](new_relic)
* [Prometheus](prometheus)
* [Datadog](datadog)
* [Datadog<i class='badge badge-v3'></i>](datadog)
* [Image formats support](image_formats_support)
* [About processing pipeline](about_processing_pipeline)
* [Health check](healthcheck)

@ -85,13 +85,34 @@ body::before {
}
}
.pro-badge {
height: 1em;
i.badge::before {
display: inline-block;
height: 1.5em;
line-height: 1.5em;
vertical-align: middle;
border: 1px solid;
font-size: .6em;
font-weight: 700;
font-style: normal;
border-radius: 0.75em;
padding: 0 .5em;
}
h1 .pro-badge, h2 .pro-badge, h3 .pro-badge, h4 .pro-badge {
margin-left: .25ch;
i.badge-pro::before {
content: "pro";
color: #177bd3;
border-color: #177bd3;
text-transform: uppercase;
}
i.badge-v3::before {
content: "v3";
color: #ff7401;
border-color: #ff7401;
}
h1 i.badge, h2 i.badge, h3 i.badge, h4 i.badge, .sidebar-nav i.badge {
margin-left: .5ch;
}
.github-edit-btn {

@ -1,4 +1,4 @@
# Autoquality<img class='pro-badge' src='assets/pro.svg' alt='pro' />
# Autoquality<i class='badge badge-pro'></i>
imgproxy can calculate quality for your resulting images so they fit the selected metric the best. The supported methods are [none](#none), [size](#autoquality-by-file-size), [dssim](#autoquality-by-dssim), and [ml](#autoquality-with-ml).

@ -1,4 +1,4 @@
# Chained pipelines<img class='pro-badge' src='assets/pro.svg' alt='pro' />
# Chained pipelines<i class='badge badge-pro'></i><i class='badge badge-v3'></i>
Though imgproxy's [processing pipeline](about_processing_pipeline.md) is suitable for most cases, sometimes it's handy to run multiple chained pipelines with different options.

@ -1,4 +1,4 @@
# Chaining the processing<img class='pro-badge' src='assets/pro.svg' alt='pro' />
# Chaining the processing<i class='badge badge-pro'></i>
Though imgproxy's [processing pipeline](about_processing_pipeline.md) is suitable for most cases, sometimes it's handy to run multiple chained pipelines with different options.

@ -41,9 +41,9 @@ echo $(xxd -g 2 -l 64 -p /dev/random | tr -d '\n')
* `IMGPROXY_PATH_PREFIX`: URL path prefix. Example: when set to `/abc/def`, imgproxy URL will be `/abc/def/%signature/%processing_options/%source_url`. Default: blank.
* `IMGPROXY_USER_AGENT`: User-Agent header that will be sent with source image request. Default: `imgproxy/%current_version`;
* `IMGPROXY_USE_ETAG`: when `true`, enables using [ETag](https://en.wikipedia.org/wiki/HTTP_ETag) HTTP header for HTTP cache control. Default: false;
* `IMGPROXY_CUSTOM_REQUEST_HEADERS`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> 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`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> list of custom response headers, divided by `\;` (can be redefined by `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`). Example: `X-MyHeader1=Lorem\;X-MyHeader2=Ipsum`;
* `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> string that will be used as a custom headers separator. Default: `\;`;
* `IMGPROXY_CUSTOM_REQUEST_HEADERS`: <i class='badge badge-pro'></i> 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`: <i class='badge badge-pro'></i> list of custom response headers, divided by `\;` (can be redefined by `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`). Example: `X-MyHeader1=Lorem\;X-MyHeader2=Ipsum`;
* `IMGPROXY_CUSTOM_HEADERS_SEPARATOR`: <i class='badge badge-pro'></i> string that will be used as a custom headers separator. Default: `\;`;
* `IMGPROXY_ENABLE_DEBUG_HEADERS`: when `true`, imgproxy will add `X-Origin-Content-Length` header with the value is size of the source image. Default: `false`.
## Security
@ -93,11 +93,11 @@ Also you may want imgproxy to respond with the same error message that it writes
### Advanced JPEG compression
* `IMGPROXY_JPEG_PROGRESSIVE`: when true, enables progressive JPEG compression. Default: false;
* `IMGPROXY_JPEG_NO_SUBSAMPLE`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> when true, chrominance subsampling is disabled. This will improve quality at the cost of larger file size. Default: false;
* `IMGPROXY_JPEG_TRELLIS_QUANT`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> when true, enables trellis quantisation for each 8x8 block. Reduces file size but increases compression time. Default: false;
* `IMGPROXY_JPEG_OVERSHOOT_DERINGING`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> 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`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> when true, split 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`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> quantization table to use. Supported values are:
* `IMGPROXY_JPEG_NO_SUBSAMPLE`: <i class='badge badge-pro'></i> when true, chrominance subsampling is disabled. This will improve quality at the cost of larger file size. Default: false;
* `IMGPROXY_JPEG_TRELLIS_QUANT`: <i class='badge badge-pro'></i> when true, enables trellis quantisation for each 8x8 block. Reduces file size but increases compression time. Default: false;
* `IMGPROXY_JPEG_OVERSHOOT_DERINGING`: <i class='badge badge-pro'></i> 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`: <i class='badge badge-pro'></i> when true, split 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`: <i class='badge badge-pro'></i> 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;
@ -118,8 +118,8 @@ Also you may want imgproxy to respond with the same error message that it writes
### Advanced GIF compression
* `IMGPROXY_GIF_OPTIMIZE_FRAMES`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> when true, enables GIF frames optimization. This may produce a smaller result, but may increase compression time.
* `IMGPROXY_GIF_OPTIMIZE_TRANSPARENCY`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> when true, enables GIF transparency optimization. This may produce a smaller result, but may increase compression time.
* `IMGPROXY_GIF_OPTIMIZE_FRAMES`: <i class='badge badge-pro'></i> when true, enables GIF frames optimization. This may produce a smaller result, but may increase compression time.
* `IMGPROXY_GIF_OPTIMIZE_TRANSPARENCY`: <i class='badge badge-pro'></i> when true, enables GIF transparency optimization. This may produce a smaller result, but may increase compression time.
### Advanced AVIF compression
@ -131,17 +131,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`: the method of quality calculation. Default: `none`.
* `IMGPROXY_AUTOQUALITY_TARGET`: desired value of the autoquality method metric. Default: 0.02.
* `IMGPROXY_AUTOQUALITY_MIN`: minimal quality imgproxy can use. Default: 70.
* `IMGPROXY_AUTOQUALITY_FORMAT_MIN`: 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`: maximal quality imgproxy can use. Default: 80.
* `IMGPROXY_AUTOQUALITY_FORMAT_MAX`: maximal 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_MAX` value is used. Default: `avif=50`.
* `IMGPROXY_AUTOQUALITY_ALLOWED_ERROR`: allowed `IMGPROXY_AUTOQUALITY_TARGET` error. Applicable only to `dssim` and `ml` methods. Default: 0.001.
* `IMGPROXY_AUTOQUALITY_MAX_RESOLUTION`: when value is greater then zero and the result resolution exceeds the value, autoquality won't be used. Default: 0.
* `IMGPROXY_AUTOQUALITY_JPEG_NET`: path to the neural network for JPEG.
* `IMGPROXY_AUTOQUALITY_WEBP_NET`: path to the neural network for WebP.
* `IMGPROXY_AUTOQUALITY_AVIF_NET`: path to the neural network for AVIF.
* `IMGPROXY_AUTOQUALITY_METHOD`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> the method of quality calculation. Default: `none`.
* `IMGPROXY_AUTOQUALITY_TARGET`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> desired value of the autoquality method metric. Default: 0.02.
* `IMGPROXY_AUTOQUALITY_MIN`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> minimal quality imgproxy can use. Default: 70.
* `IMGPROXY_AUTOQUALITY_FORMAT_MIN`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> 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`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> maximal quality imgproxy can use. Default: 80.
* `IMGPROXY_AUTOQUALITY_FORMAT_MAX`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> maximal 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_MAX` value is used. Default: `avif=50`.
* `IMGPROXY_AUTOQUALITY_ALLOWED_ERROR`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> allowed `IMGPROXY_AUTOQUALITY_TARGET` error. Applicable only to `dssim` and `ml` methods. Default: 0.001.
* `IMGPROXY_AUTOQUALITY_MAX_RESOLUTION`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> when value is greater then zero and the result resolution exceeds the value, autoquality won't be used. Default: 0.
* `IMGPROXY_AUTOQUALITY_JPEG_NET`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> path to the neural network for JPEG.
* `IMGPROXY_AUTOQUALITY_WEBP_NET`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> path to the neural network for WebP.
* `IMGPROXY_AUTOQUALITY_AVIF_NET`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> path to the neural network for AVIF.
## AVIF/WebP support detection
@ -172,10 +172,10 @@ imgproxy can use the `Width`, `Viewport-Width` or `DPR` HTTP headers to determin
imgproxy Pro can extract specific frames of videos to create thumbnails. The feature is disabled by default, but can be enabled with `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`.
* `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> then true, enables video thumbnails generation. Default: false;
* `IMGPROXY_VIDEO_THUMBNAIL_SECOND`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> the timestamp of the frame in seconds that will be used for a thumbnail. Default: 1.
* `IMGPROXY_VIDEO_THUMBNAIL_PROBE_SIZE`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> 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`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> the maximum of milliseconds used to get the stream info. Low 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`: <i class='badge badge-pro'></i> then true, enables video thumbnails generation. Default: false;
* `IMGPROXY_VIDEO_THUMBNAIL_SECOND`: <i class='badge badge-pro'></i> the timestamp of the frame in seconds that will be used for a thumbnail. Default: 1.
* `IMGPROXY_VIDEO_THUMBNAIL_PROBE_SIZE`: <i class='badge badge-pro'></i> 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`: <i class='badge badge-pro'></i> the maximum of milliseconds used to get the stream info. Low 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 thumbnails generation, you should use them in production only when you know what are you doing.
@ -185,7 +185,7 @@ imgproxy Pro can extract specific frames of videos to create thumbnails. The fea
* `IMGPROXY_WATERMARK_PATH`: path to the locally stored image;
* `IMGPROXY_WATERMARK_URL`: watermark image URL;
* `IMGPROXY_WATERMARK_OPACITY`: watermark base opacity;
* `IMGPROXY_WATERMARKS_CACHE_SIZE`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> size of custom watermarks cache. When set to `0`, watermarks cache is disabled. By default 256 watermarks are cached.
* `IMGPROXY_WATERMARKS_CACHE_SIZE`: <i class='badge badge-pro'></i> size of custom watermarks cache. When set to `0`, watermarks cache is disabled. By default 256 watermarks are cached.
Read more about watermarks in the [Watermark](watermark.md) guide.
@ -193,23 +193,23 @@ Read more about watermarks in the [Watermark](watermark.md) guide.
imgproxy Pro can apply unsharpening mask to your images.
* `IMGPROXY_UNSHARPENING_MODE`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> controls when unsharpenning mask should be applied. The following modes are supported:
* `IMGPROXY_UNSHARPENING_MODE`: <i class='badge badge-pro'></i> controls when unsharpenning mask should be applied. The following modes are supported:
* `auto`: _(default)_ apply unsharpening mask only when image is downscaled and `sharpen` option is not set.
* `none`: don't apply the unsharpening mask.
* `always`: always apply the unsharpening mask.
* `IMGPROXY_UNSHARPENING_WEIGHT`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> a floating-point number that defines how neighbor pixels will affect the current pixel. Greater the value - sharper the image. Should be greater than zero. Default: `1`.
* `IMGPROXY_UNSHARPENING_DIVIDOR`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> a floating-point number that defines the unsharpening strength. Lesser the value - sharper the image. Should be greater than zero. Default: `24`.
* `IMGPROXY_UNSHARPENING_WEIGHT`: <i class='badge badge-pro'></i> a floating-point number that defines how neighbor pixels will affect the current pixel. Greater the value - sharper the image. Should be greater than zero. Default: `1`.
* `IMGPROXY_UNSHARPENING_DIVIDOR`: <i class='badge badge-pro'></i> a floating-point number that defines the unsharpening strength. Lesser the value - sharper the image. Should be greater than zero. Default: `24`.
## Object detection
imgproxy can detect objects on the image and use them for smart crop, bluring the detections, or drawing the detections.
* `IMGPROXY_OBJECT_DETECTION_CONFIG`: path to the neural network config. Default: blank.
* `IMGPROXY_OBJECT_DETECTION_WEIGHTS`: path to the neural network weights. Default: blank.
* `IMGPROXY_OBJECT_DETECTION_CLASSES`: path to the text file with the classes names, one by line. Default: blank.
* `IMGPROXY_OBJECT_DETECTION_NET_SIZE`: 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`: the detections with confidences below this value will be discarded. Default: 0.2.
* `IMGPROXY_OBJECT_DETECTION_NMS_THRESHOLD`: non max supression threshold. Don't change this if you don't know what you're doing. Default: 0.4.
* `IMGPROXY_OBJECT_DETECTION_CONFIG`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> path to the neural network config. Default: blank.
* `IMGPROXY_OBJECT_DETECTION_WEIGHTS`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> path to the neural network weights. Default: blank.
* `IMGPROXY_OBJECT_DETECTION_CLASSES`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> path to the text file with the classes names, one by line. Default: blank.
* `IMGPROXY_OBJECT_DETECTION_NET_SIZE`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> 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`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> the detections with confidences below this value will be discarded. Default: 0.2.
* `IMGPROXY_OBJECT_DETECTION_NMS_THRESHOLD`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> non max supression threshold. Don't change this if you don't know what you're doing. Default: 0.4.
## Fallback image
@ -218,8 +218,8 @@ You can set up a fallback image that will be used in case imgproxy can't fetch t
* `IMGPROXY_FALLBACK_IMAGE_DATA`: Base64-encoded image data. You can easily calculate it with `base64 tmp/fallback.png | tr -d '\n'`;
* `IMGPROXY_FALLBACK_IMAGE_PATH`: path to the locally stored image;
* `IMGPROXY_FALLBACK_IMAGE_URL`: fallback image URL.
* `IMGPROXY_FALLBACK_IMAGE_HTTP_CODE`: HTTP code for the fallback image response. Default: `200`.
* `IMGPROXY_FALLBACK_IMAGES_CACHE_SIZE`: <img class='pro-badge' src='assets/pro.svg' alt='pro' /> size of custom fallback images cache. When set to `0`, fallback images cache is disabled. By default 256 fallback images are cached.
* `IMGPROXY_FALLBACK_IMAGE_HTTP_CODE`: <i class='badge badge-v3'></i> HTTP code for the fallback image response. Default: `200`.
* `IMGPROXY_FALLBACK_IMAGES_CACHE_SIZE`: <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> size of custom fallback images cache. When set to `0`, fallback images cache is disabled. By default 256 fallback images are cached.
## Skip processing
@ -319,6 +319,14 @@ imgproxy can collect its metrics for Prometheus. Specify binding for Prometheus
Check out the [Prometheus](prometheus.md) guide to learn more.
## Datadog metrics
imgproxy can send its metrics to Datadog:
* `IMGPROXY_DATADOG_ENABLE`: <i class='badge badge-v3'></i> when `true`, enables sending metrics to Datadog. Default: false;
Check out the [Datadog](datadog.md) guide to learn more.
## Error reporting
imgproxy can report occurred errors to Bugsnag, Honeybadger and Sentry:

@ -1,4 +1,4 @@
# Datadog
# Datadog<i class='badge badge-v3'></i>
imgproxy can send its metrics to Datadog. To use this feature, do the following:

@ -62,7 +62,7 @@ Defines how imgproxy will resize the source image. Supported resizing types are:
Default: `fit`
### Resizing algorithm<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=resizing-algorithm
### Resizing algorithm<i class='badge badge-pro'></i> :id=resizing-algorithm
```
resizing_algorithm:%algorithm
@ -180,7 +180,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` - <img class='pro-badge' src='assets/pro.svg' alt='pro' /> 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` - <i class='badge badge-pro'></i> <i class='badge badge-v3'></i> 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` - focus point gravity. `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
@ -276,7 +276,7 @@ With no arguments provided, disables any background manipulations.
Default: disabled
### Background alpha<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=background-alpha
### Background alpha<i class='badge badge-pro'></i> :id=background-alpha
```
background_alpha:%alpha
@ -287,7 +287,7 @@ Adds alpha channel to `background`. `alpha` is a positive floating point number
Default: 1
### Adjust<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=adjust
### Adjust<i class='badge badge-pro'></i> :id=adjust
```
adjust:%brightness:%contrast:%saturation
@ -296,7 +296,7 @@ a:%brightness:%contrast:%saturation
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<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=brightness
### Brightness<i class='badge badge-pro'></i> :id=brightness
```
brightness:%brightness
@ -307,7 +307,7 @@ When set, imgproxy will adjust brightness of the resulting image. `brightness` i
Default: 0
### Contrast<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=contrast
### Contrast<i class='badge badge-pro'></i> :id=contrast
```
contrast:%contrast
@ -318,7 +318,7 @@ When set, imgproxy will adjust contrast of the resulting image. `contrast` is a
Default: 1
### Saturation<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=saturation
### Saturation<i class='badge badge-pro'></i> :id=saturation
```
saturation:%saturation
@ -364,7 +364,7 @@ When set, imgproxy will apply the pixelate filter to the resulting image. `size`
Default: disabled
### Unsharpening<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=unsharpening
### Unsharpening<i class='badge badge-pro'></i> :id=unsharpening
```
unsharpening:%mode:%weight:%dividor
@ -373,7 +373,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<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=blur-detections
### Blur detections<i class='badge badge-pro'></i><i class='badge badge-v3'></i> :id=blur-detections
```
blur_detections:%sigma:%class_name1:%class_name2:...:%class_nameN
@ -384,7 +384,7 @@ imgproxy [detects objects](object_detection.md) of provided classes and blus the
`sigma` defines the size of a mask imgproxy will use.
### Draw detections<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=draw-detections
### Draw detections<i class='badge badge-pro'></i><i class='badge badge-v3'></i> :id=draw-detections
```
draw_detections:%draw:%class_name1:%class_name2:...:%class_nameN
@ -419,7 +419,7 @@ Puts watermark on the processed image.
Default: disabled
### Watermark URL<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=watermark-url
### Watermark URL<i class='badge badge-pro'></i> :id=watermark-url
```
watermark_url:%url
@ -430,7 +430,7 @@ When set, imgproxy will use the image from the specified URL as a watermark. `ur
Default: blank
### Style<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=style
### Style<i class='badge badge-pro'></i> :id=style
```
style:%style
@ -505,7 +505,7 @@ When set, imgproxy automatically degrades the quality of the image until the ima
Default: 0
### JPEG options<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=jpeg-options
### JPEG options<i class='badge badge-pro'></i> :id=jpeg-options
```
jpeg_options:%progressive:%no_subsample:%trellis_quant:%overshoot_deringing:%optimize_scans:%quant_table
@ -514,7 +514,7 @@ jpgo:%progressive:%no_subsample:%trellis_quant:%overshoot_deringing:%optimize_sc
Allows redefining JPEG saving options. All arguments have the same meaning as [Advanced JPEG compression](configuration.md#advanced-jpeg-compression) configs. All arguments are optional and can be omitted.
### PNG options<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=png-options
### PNG options<i class='badge badge-pro'></i> :id=png-options
```
png_options:%interlaced:%quantize:%quantization_colors
@ -523,7 +523,7 @@ pngo:%interlaced:%quantize:%quantization_colors
Allows redefining PNG saving options. All arguments have the same meaning as [Advanced PNG compression](configuration.md#advanced-png-compression) configs. All arguments are optional and can be omitted.
### GIF options<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=gif-options
### GIF options<i class='badge badge-pro'></i> :id=gif-options
```
gif_options:%optimize_frames:%optimize_transparency
@ -544,7 +544,7 @@ Specifies the resulting image format. Alias for [extension](#extension) URL part
Default: `jpg`
### Page<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=page
### Page<i class='badge badge-pro'></i> :id=page
```
page:%page
@ -555,7 +555,7 @@ When source image supports pagination (PDF, TIFF) or animation (GIF, WebP), this
Default: 0
### Video thumbnail second<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=video-thumbnail-second
### Video thumbnail second<i class='badge badge-pro'></i> :id=video-thumbnail-second
```
video_thumbnail_second:%second
@ -564,7 +564,7 @@ vts:%second
Allows redefining `IMGPROXY_VIDEO_THUMBNAIL_SECOND` config.
### Fallback image URL<img class='pro-badge' src='assets/pro.svg' alt='pro' />
### Fallback image URL<i class='badge badge-pro'></i><i class='badge badge-v3'></i> :id=fallback-image-url
You can use a custom fallback image specifying its URL with `fallback_image_url` processing option:

@ -1,4 +1,4 @@
# Getting the image info<img class='pro-badge' src='assets/pro.svg' alt='pro' />
# Getting the image info<i class='badge badge-pro'></i>
imgproxy can fetch and return the source image info without downloading the whole image.

@ -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 <img class='pro-badge' src='assets/pro.svg' alt='pro' /> | `pdf` | Yes | No |
| MP4 (h264) <img class='pro-badge' src='assets/pro.svg' alt='pro' /> | `mp4` | [See notes](#video-thumbnails) | Yes |
| Other video formats <img class='pro-badge' src='assets/pro.svg' alt='pro' /> | | [See notes](#video-thumbnails) | No |
| PDF<i class='badge badge-pro'></i> | `pdf` | Yes | No |
| MP4 (h264)<i class='badge badge-pro'></i> | `mp4` | [See notes](#video-thumbnails) | Yes |
| Other video formats<i class='badge badge-pro'></i> | | [See notes](#video-thumbnails) | No |
## GIF support
@ -58,13 +58,13 @@ Since processing of animated images is pretty heavy, only one frame is processed
**📝Note:** imgproxy summarizes all frames resolutions while checking source image resolution.
## Converting animated images to MP4<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=converting-animated-images-to-mp4
## Converting animated images to MP4<i class='badge badge-pro'></i> :id=converting-animated-images-to-mp4
Animated images results can be converted to MP4 by specifying `mp4` extension.
Since MP4 requires usage of a `<video>` tag instead of `<img>`, automatic conversion to MP4 is not provided.
## Video thumbnails<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=video-thumbnails
## Video thumbnails<i class='badge badge-pro'></i> :id=video-thumbnails
If you provide a video as a source, imgproxy takes its specific frame to create a thumbnail. Doing this imgproxy downloads only the amount of data required to reach the needed frame.

@ -80,6 +80,7 @@
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="https://unpkg.com/docsify-copy-code@2"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Fira+Mono|Roboto:400,700&display=swap" rel="stylesheet">
</body>
</html>

@ -1,4 +1,4 @@
# Object detection<img class='pro-badge' src='assets/pro.svg' alt='pro' />
# Object detection<i class='badge badge-pro'></i>
imgproxy can detect objects on the image and use them for smart crop, bluring the detections, or drawing the detections.

@ -43,7 +43,7 @@ Where arguments are:
* `x_offset`, `y_offset` - (optional) specify watermark offset by X and Y axes. Not applicable to `re` position;
* `scale` - (optional) floating point number that defines watermark size relative to the resulting image size. When set to `0` or omitted, watermark size won't be changed.
## Custom watermarks<img class='pro-badge' src='assets/pro.svg' alt='pro' /> :id=custom-watermarks
## Custom watermarks<i class='badge badge-pro'></i> :id=custom-watermarks
You can use a custom watermark specifying its URL with `watermark_url` processing option: