Image watermark
Image watermark parameters are the parameters used when adding image watermarks.
You can pre-process the image watermark before adding it to the original image. These pre-processing operations include Resizing Images, Rotating Images, and Cropping Images, but does not include cropping it into an inscribed circle. In addition, you can scale the watermark based on the original image when resizing for pre-processing.
Table 1 lists the descriptions for image watermark parameters in detail.
| Parameter | Value Description | Code Example |
|---|---|---|
| image | Watermark image path. This parameter is mandatory when you add a watermark. The image watermark address is: bucketName/objectName(required code) or bucketName/objectName?x-image-process=image/command(required code). NOTICE: The content must be base64 code of URL. encodedObject = url_safe_base64_encode(object). For example, if the object is panda.png, the content after coding will be cGFuZGEucG5n. | image/resize,w_400/watermark,image_aW1h Z2UtZGVtby9sb2dvLnBuZz94LWltYWdlLXByb 2Nlc3M9aW1hZ2UvcmVzaXplLFBfMzA=,t_90, g_br,x_10,y_10 |
| P | Watermark image size. The watermark image is scaled according to the percentage P of the original image (image to which the watermark is added). The value ranges from 1 to 100. NOTICE: The preceding resize operation supports only the uppercase P parameter. To adjust the watermark image size, see Resizing Images (except the p parameter). | image-demo/logo.png?x-image-process=image/resize,P_50 |
API Calling Examples
- The watermark file is logo.png (logo address: image-demo/logo.png). The watermark locates at the bottom right corner. The transparency value is 90, and both the horizontal and vertical edge spacing are set to 10 by default.
Parameters are as follows:
Watermark image: image-demo/logo.png
URL Base64 code: aW1hZ2UtZGVtby9sb2dvLnBuZw==
Watermark at the bottom right: g_br
Transparency: t_90
Horizontal spacing and horizontal spacing: x_10,y_10
The URL request is as follows:

- The watermark image file is logo.png (logo address: image-demo/logo.png). Resize the watermark image by setting its width to 50 for pre-processing. Other parameters are set in a way similar to the previous example.
Parameters are as follows:
The watermark image: image-demo/logo.png?x-image-process=image/resize,w_50
URL Base64 code: aW1hZ2UtZGVtby9sb2dvLnBuZz94LWltYWdlLXByb2Nlc3M9aW1hZ2UvcmVzaXplLHdfNTA=
Watermark at the bottom right: g_br
Transparency: t_90
Horizontal spacing and horizontal spacing: x_10,y_10
The URL request is as follows:

- The watermark image file is logo.png (logo address: image-demo/logo.png). Scale down the watermark image to 50% of the original image for pre-processing. Other parameters are set in a way similar to the previous example.
Parameters are as follows:
The watermark image: image-demo/logo.png?x-image-process=image/resize,P_50
URL Base64 code: aW1hZ2UtZGVtby9sb2dvLnBuZz94LWltYWdlLXByb2Nlc3M9aW1hZ2UvcmVzaXplLHdfNTA=
Watermark at the bottom right: g_br
Transparency: t_90
Horizontal spacing and horizontal spacing: x_10,y_10
The URL request is as follows:

GUI Example
You can configure image watermarks by editing image style on OBS Console. The watermark file is logo.png (logo address: image-demo/logo.png). The watermark locates at the bottom right corner. The transparency value is 90, and both the horizontal and vertical edge spacing are set to 10 by default. Perform the following steps on the console:
- Log in to OBS Console, in the navigation tree on the left, click the bucket name and choose Image Processing.
- Click Create Style to go to the style editing page.
- On the editing page, input a style name, set the Edit Mode to GUI, and select Watermark.
A style name consists of letters (uppercase and lowercase), digits, periods (.), underlines (_), and hyphens (-), and contains 1 to 256 characters. For example, rotate_0001.
- Configure the following watermark parameters. See Figure 1.
- Watermark Type: Choose Image Watermark.
- Watermark Image Path: Enter image-demo/logo.png.
- Image Size (%): Set this parameter based on whether the watermark image is zoomed out.
- Brightness: Retain the default value 0.
- Contrast: Retain the default value 0.
- Transparency: Set this parameter to 90.
- Watermark position: Select the arrow
at the bottom right. - Vertical margin: Retain the default value 10.
- Horizontal margin: Retain the default value 10.
- After finishing editing the image style, click OK to save the style. The new style will be displayed in the style list.
You can use the new watermark style to process images by referring to Applying Image Styles.
Last Article: Public Parameters
Next Article: Text watermark

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.