Add Image Watermark to Image
Image → Add Image Watermark to Image
The Add Image Watermark to Image API overlays one image on another. You send the main image (docContent, docName), the watermark image (WatermarkFileContent, WatermarkFileName), Position (e.g. topright, centralhorizontal), and optionally Opacity, Rotation, offsets, and async. The API returns the image with the watermark applied. Use the tester below to try it; more details are in the sections that follow.
Try the Add Image Watermark to Image API
:::note Quick reference
Endpoint: POST /api/v2/AddImageWatermarkToImage · Required: api-key, docContent, docName, WatermarkFileContent, WatermarkFileName, Position
:::
:::info Try it live Use the form below to send your API key, main image and watermark image (Base64), and position. Adjust opacity and rotation as needed; the response is the watermarked image. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Add Image Watermark to Image?
This endpoint overlays a watermark image on a main image. You provide both images (Base64), Position (e.g. topright, bottomleft, centralhorizontal, centralvertical, diagonal, custom), and optionally Opacity, HorizontalOffset, VerticalOffset, PositionX, PositionY, and Rotation. The API returns the combined image.
Key features
- Position – topright, topleft, bottomright, bottomleft, centralhorizontal, centralvertical, diagonal, or custom (PositionX, PositionY).
- Opacity and rotation – Control visibility and angle of the watermark.
- Offsets – Fine-tune position with HorizontalOffset and VerticalOffset.
:::tip Best for Use when you need to overlay a logo or graphic on images. For text overlays use Add Text Watermark to Image. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | Main image file content (Base64). Supported: JPG, PNG, GIF, BMP, TIFF. |
| docName | string | Yes | Output image file name. |
| WatermarkFileContent | base64 | Yes | Watermark image (Base64). Supported: JPG, PNG, GIF, BMP, TIFF. |
| WatermarkFileName | string | Yes | Watermark image file name. |
| Position | string | Yes | Position: topright, topleft, bottomright, bottomleft, centralhorizontal, centralvertical, diagonal, custom. |
| Opacity, Rotation, HorizontalOffset, VerticalOffset, PositionX, PositionY | number | No | Appearance and positioning. |
| async | boolean | No | Enable asynchronous processing. |
When to use Add Image Watermark to Image
- Logos – Overlay a logo on photos or product images.
- Branding – Add a consistent watermark graphic across many images.
- Stamps – Apply “Approved” or “Confidential” image stamps.
:::info Need the full API? For request/response schemas and code samples, see Add Image Watermark to Image in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A main image file (JPG, PNG, GIF, BMP, TIFF) in Base64 format
- A watermark image file (JPG, PNG, GIF, BMP, TIFF) in Base64 format
Response Format
The API returns an image file with the image watermark applied.