Add Watermark on Images using PHP

/ By Arjun / Published on August 5, 2017

One of the most common approaches to brand/protect images is watermarking. Here I would like to show you how to use PHP to add a watermark to images. PHP uses its GD library to write text on images using true type fonts.

To add a watermark, you need an image and any font with extension ttf. For example, I will use “arail.ttf” in my tutorial. Image type can be jpg / jpeg, png, gif, wbmp.

Function to Watermark

Below function will add watermark on images and this function accepts two parameters images path and watermark text.

How to use

As I mentioned above, this function accepts two parameters; image path, and watermark text.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

5 1 vote
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mahendra
Mahendra
2 months ago

How to add new layer at the end of existing gif image using php

1
0
Would love your thoughts, please comment.x
()
x