You can easily watermark images in CodeIgniter by using CI’s image manipulation class. In CI Watermarking is only available using the GD/GD2 library.

CI’s image manipulation library allows us to do image watermark in two ways with tiny configurations changes.

1. Text watermark.(wm_text)
2. Image over relay watermark.(wm_overlay_path)

Below is my Watermarkdemo controller, you will find both text and overlay examples in the controller.

That’s it.you just need to pass the correct image, font and overlay image paths to config array Now you can point your browsers to http://yourDomain//watermarkdemo/overlay or http://yourDomain/index.php/watermarkdemo/overlay then check upload directory in the root.

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.

Published by Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.

Join the Conversation

9 Comments

  1. Hai Arjun, i want to get answer to one doubt about water marking. is it possible to remove water marking from an image using codeigniter? please reply

  2. Your watermarking code is working fine for me. 🙂 I have one question, do you have the article of resizing image? I try to find in your website but I didn’t see it. Thanks in advance for your answer.

  3. Hello Arjun. This post is awesome. I have successfully done it. Now i need to add rotational angle to the watermark text. I have done R&D on it. then i conclude that rotational angle is not added in image lib. How can i manually add in image library

Leave a comment

Your email address will not be published. Required fields are marked *