# Dynamic watermark

The dynamic watermark function allows you to specify the watermark image in the Cloudimage URL. This way, different watermarks can be used with different images.

## Available parameters

| Parameter                                               | Syntax                                                                                                            | Description                                                                                                                    |       |        |                           |                     |                                                   |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----- | ------ | ------------------------- | ------------------- | ------------------------------------------------- |
| use watermark                                           | <mark style="color:purple;">**wat=1**</mark>                                                                      | **(required)** Activates the watermark function                                                                                |       |        |                           |                     |                                                   |
| watermark URL                                           | <mark style="color:purple;">**wat\_url=X**</mark>                                                                 | **(required)** The URL of the watermark image. Can be URL-encoded                                                              |       |        |                           |                     |                                                   |
| watermark gravity                                       | <p><mark style="color:purple;"><strong>wat\_gravity=X</strong></mark><br><code>X=\[north                          | south]\[east                                                                                                                   | west] | center | </code><br><code>absolute | relative</code></p> | Defines the position to "anchor" the watermark to |
| watermark scaling (relative to original watermark size) | <p><mark style="color:purple;"><strong>wat\_scale=X</strong></mark><br><code>X=0..100</code></p>                  | Watermark image scaling defined in in percent of the watermark dimensions                                                      |       |        |                           |                     |                                                   |
| watermark scaling (relative to output image size)       | <p><mark style="color:purple;"><strong>wat\_scale=Xp</strong></mark><br><code>X=0..100p</code></p>                | Watermark image scaling defined in in percent of the output image dimensions                                                   |       |        |                           |                     |                                                   |
| watermark padding                                       | <p><mark style="color:purple;"><strong>wat\_pad=X\[p]\[,Y\[p]]</strong></mark><br><code>X/Y=0..100\[p]</code></p> | Adds padding from the anchoring point in pixels (**X**) or in percent (**Xp**)                                                 |       |        |                           |                     |                                                   |
| watermark position                                      | <mark style="color:purple;">**wat\_pos=X\[,Y]**</mark>                                                            | <p>sets the position in percent from the resized image; works only with<br>wat\_gravity=absolute and wat\_gravity=relative</p> |       |        |                           |                     |                                                   |
| watermark opacity                                       | <p><mark style="color:purple;"><strong>wat\_opacity=X</strong></mark><br><code>X=0..1</code></p>                  | Defines watermark opacity                                                                                                      |       |        |                           |                     |                                                   |

## Examples

| Preview                                                                                            | Syntax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://content.gitbook.com/content/IDIcmPiz7q6Sr6ZHHQxV/blobs/a2PQNYEYGnKQxzVkiPPK/image.png) | [/samples.scalefelx.com/voyage-louis-vuitton.jpg?<mark style="color:orange;">**w=600**</mark>&<mark style="color:purple;">**wat=1**</mark>&<mark style="color:purple;">**wat\_url=http://sample.li/louis-vuitton-logo-white.png**</mark>&<mark style="color:purple;">**wat\_scale=45**</mark>&<mark style="color:purple;">**wat\_gravity=southeast**</mark>&<mark style="color:purple;">**wat\_pad=15**</mark>](https://doc.cloudimg.io/https://samples.scaleflex.com/voyage-louis-vuitton.jpg?w=600\&wat=1\&wat_url=http://sample.li/louis-vuitton-logo-white.png\&wat_scale=45\&wat_gravity=southeast\&wat_pad=15) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudimage.io/transformations/image-watermarking/dynamic-watermark.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
