Skip to the content
Documentation

Adding custom watermarks

No ratings yet

A watermark marks an image as yours, for example with a logo or a line of text in a corner. The watermark tool of the image editor puts a text on any image. Images to use as watermarks are set up by an administrator; this page shows how, for both image editors.

Add a watermark to an image

  1. Edit the item, press Edit image and choose the watermark tool (key W).
  2. Optionally, select a region with the crop tool first. The watermark is placed in the selected region, or in the lower right corner.
  3. Type the Text, or choose one of the images the site offers. Choose the Color and the Opacity.
  4. Press Apply, then Save.
The watermark tool of the image editor

The watermark tool puts a text, or one of the images your site configures, on the image.

Offer your own watermark images in Admin 4 (expimageeditor)

  1. Put the image, best a PNG with transparency, into a design folder of your extension, for example extension/mysite/design/standard/images/watermarks/logo.png.
  2. List it in expimageeditor.ini [EditorSettings] Watermarks[] as <label>;<design path>. The path is found like any design file.
  3. Clear the INI cache.
# extension/mysite/settings/expimageeditor.ini.append.php
[EditorSettings]
Watermarks[]=Logo;images/watermarks/logo.png

An entry without exactly two parts is ignored. Fonts for the watermark text are listed the same way in Fonts[]; three fonts under the SIL Open Font License ship with the editor and can be listed there.

Offer your own watermark images in the classic admin (ezie)

  1. Put the image into a design/standard/images/watermarks folder of your extension, for example extension/mysite/design/standard/images/watermarks/logo.png.
  2. Register it in extension/mysite/settings/image.ini.append.php.
  3. Clear the caches. The watermark is offered in the editor.
[eZIE]
watermarks[]=logo.png

ezie accepts only a plain file name that exists in a design/standard/images/watermarks folder. It ships elephpant.png and ez-logo.png.

What can go wrong

  • The new image is not offered. The INI cache still holds the old list. Clear it, and check the spelling of the path.
  • The watermark has a white box around it. The image has no transparency. Save it as a PNG with a transparent background.

Read more

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.