Watermark using PHP

  • Tanvir
  • Sep 07, 2023

  • Notice: Undefined index: user in /home/codeartb/blog.codeartbd.com/post.php on line 78

    Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in /home/codeartb/blog.codeartbd.com/post.php on line 79

    Notice: Trying to access array offset on value of type null in /home/codeartb/blog.codeartbd.com/post.php on line 80
    15
  • 0

How to add watermark on your uploaded image in PHP?

Adding watermark in PHP is very simple. It can be done using PHP image libraries like GD. Using GD functions, we can copy a portion of the image on another image. Check the following code:

You can use this function with source and destination image path to add watermark on your source image.

This lines of codes copy the given watermark image onto right bottom of your source image and then render a same sized photo on destination path.

Download source code

Share:

Leave your Comment

© 2025 Tanvir's Blog | All Rights Reserved