The position of the watermark on the image (nw, n, ne, w, e, sw, s, se).

opacity

Number

0.7

The transparency of watermark, the value between 0 and 1.

margin

Number

10

Distance from watermark to edge of image.

outputWidth

Number

'auto'

Image width after adding watermark, units: px or use 'auto'.

outputHeight

Number

'auto'

Image height after adding watermark, units: px or use 'auto'.

outputType

String

'jpeg'

Image format after adding watermark, You can use one of three types (jpeg, png, webp).

done

Function

function(imgURL){this.src=imgURL;}

Called after image with watermark is created.

fail

Function

function(){}

Called after an error of images is occurring.

always

Function

function(){}

Called when processing finishes (done and fail).

Note:

If you use the text parameter, path parameter will be disabled. The watermark will be created from the text you type in text parameter.

In the outputType parameter, webp format only works on the Chrome browser. With other browsers, it will return the png format. Should avoid use png format, because image quality not much higher, but the output image size is quite large.

Choose output image size

For example, limit the maximum width is 500px.

$(function() {
$('.img_awesome').watermark({
outputWidth: 500
});
});

You can also limit the height of image with outputHeight parameter. Should not use 2 size parameters simultaneously, because it can distort your image. Should only use a parameter, it will adjust the remaining parameter with image ratio.