htaccess

A Simple PHP Watermark

With a recent requirement to protect some images with a non-destructive watermark on a Pixelpost implementation I came across the following fairly simple solution. Using PHP and mod rewrite, you can easily apply a transparent png watermark to images as they are served or "on the fly". The original image remains unmodified! You can easily change the watermark at any time by replacing the watermark image with a different image file.

There is however a downside of some additional load on the server, as each image has to be created each time it is viewed. You do also lose some quality in the image (but I have found the result to be quite acceptable).

Syndicate content