Version: Next

Overlay

You can overlay an image with another. This feature is useful if you wish to create a watermark or simply an image composition

Usage

Accepted parameters are
url: the url of the overlay image. The url must be escaped.
g: the gravity to position the overlay. This is ignored if specific coordinates are passed.
x: The position on the right-left axis.
y: The position on the top-bottom axis.
watermark: true/false Repeat the overlay image

Try
Copy
https://caravaggio.now.sh/overlay,url:https%3A%2F%2Fcaravaggio.ramielcreations.com%2Fimg%2Fcaravaggio-logo.png,g:southeast/?image=https://cvg-res.now.sh/girls.jpeg

Result
Overlayed with

Examples

Position with gravity

You can position the watermark using the gravity parameter. Here an example putting the watermark on the west (center-left) side of the image.

Try
Copy
https://caravaggio.now.sh/overlay,g:w,url:https%3A%2F%2Fcaravaggio.ramielcreations.com%2Fimg%2Fcaravaggio-logo.png/?image=https://cvg-res.now.sh/girls.jpeg

Result
Overlayed with

Positioning with coordinates

You can specify coordinates to position the overlay. In that case any gravity values will be ignored. Let's position the overlay at position x: 100px and y: 60% of the total image height. Coordinates refers to top-left corner of the overlay.
x and y can be expressed as pixels or percentage as explained here.

Try
Copy
https://caravaggio.now.sh/overlay,x:100,y:0.6,url:https%3A%2F%2Fcaravaggio.ramielcreations.com%2Fimg%2Fcaravaggio-logo.png/?image=https://cvg-res.now.sh/girls.jpeg

Result
Overlayed with

Watermark repeat

The overlay can be repeated using watermark option.

Try
Copy
https://caravaggio.now.sh/overlay,watermark,url:https%3A%2F%2Fcvg-res.now.sh%2Foverlay.png%3Finline%3Dtrue/?image=https://cvg-res.now.sh/girls.jpeg

Result
Overlayed with