Skip to main content

Watermarking Images using PHP


Seeing one’s work altered without permission can be frustrating,

as can discovering your work on blogs that are void of any credit.

The first response for most photographers is to watermark

their images, ensuring that their logo or website graces

every image that hits the internet.

Read more about this article at this link

Using this Code, you will be able to put watermark on your images using

PHP. If you want a different watermark, you can create your own

using Photoshop.

Code Features:

1. Put watermark on Images

2. Input type file REQUIRED

3. Check if a Directory Exists

4. Check if a Directory is Empty

5. Create a Directory is not Exists

6. Display Live system date and time

7. Open New Tab using anchor tag ()


1. Before you can run this code/script, you need GD Library Installed in your Server.
For more info about PHP GD Library, visit this link

2. This Script is coded in PHP 7.1.8 and I don't know if this script will run smoothly on older versions of PHP

Code Preview Available at

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byAndika Sandi Putra (not verified)on Fri, 11/17/2017 - 12:56

hi there,,

Before i want to appologize my english bad,, sorry,,
i want ask something, what method you use to watermarking the image ?
is that, Discrete Cosine Transform (DCT) or Discrete Wavelet Transform (DWT)
or another else ?

Actually, it's the first time I've heard this two ways (Discrete Cosine Transform and Discrete Wavelet Transform) but the code uses only those predefined functions in PHP GD Library. You can refer to this link for more info.

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.