Watermark
imgproxy supports the watermarking of processed images using another image.
Specifying watermark image
There are three ways to specify a watermark image using environment variables:
-
IMGPROXY_WATERMARK_PATH
: the path to the locally stored image -
IMGPROXY_WATERMARK_URL
: the watermark image URL -
IMGPROXY_WATERMARK_DATA
: Base64-encoded image data. You can easily calculate it with the following snippet:base64 tmp/watermark.webp | tr -d '\n'`.
You can also specify the base opacity of a watermark using the IMGPROXY_WATERMARK_OPACITY
environment variable.
info
If you're going to use the scale
argument of watermark
, it's highly recommended to use SVG, WebP or JPEG watermarks since these formats support scale-on-load.