From ce73e0935cbafa6b59ce4cb3a683636c8c999349 Mon Sep 17 00:00:00 2001 From: DarthSim Date: Wed, 6 Apr 2022 13:02:53 +0600 Subject: [PATCH] Update changelog & docs --- CHANGELOG.md | 1 + docs/generating_the_url.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9fe816e..7afec257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Unreleased] ### Add - Add `IMGPROXY_FALLBACK_IMAGE_TTL` config. +- Add [watermark_size](https://docs.imgproxy.net/generating_the_url?id=watermark-size) processing option. ### Change - (pro) Don't check `Content-Length` header of videos. diff --git a/docs/generating_the_url.md b/docs/generating_the_url.md index c12d8d7f..677f3823 100644 --- a/docs/generating_the_url.md +++ b/docs/generating_the_url.md @@ -465,6 +465,23 @@ If you want to use a custom font, you need to put it in `/usr/share/fonts` insid Default: blank +### Watermark Size :id=watermark-size + +``` +watermark_size:%width:%height +wms:%width:%height +``` + +Defines the desired width and height of the watermark. imgproxy always uses `fit` resizing type when resizing watermarks and enlarges them when needed. + +When `%width` is set to `0`, imgproxy will calculate the width using the defined height and watermark's aspect ratio. + +When `%height` is set to `0`, imgproxy will calculate the height using the defined width and watermark's aspect ratio. + +**📝Note:** This processing option takes effect only when the `scale` argument of the `watermark` option is set to zero. + +Default: `0:0` + ### Style :id=style ```