Protecting images on your website by code.

posted on 21st of august, 2009

As I mentioned in my previous blog that you have to make some editing on your downloaded images (and even the created ones) in order to prevent from illegal copy.

Here I'm going to mention some tricks with the code, that could keep away a curious amateur who is trying to copy your photos...

1- To disable the image tool bar on your internet browser you can use this meta tag in the head part of your HTML...

2- To disable the right click on a whole page with no message, add this to the body tag on your HTML...
(space)oncontextmenu="return false"

3- To disable the right click on a whole page with message alert, put this script in the head of your HTML...

4- To prevent from image drag in a new window or any direct right click to save, put the image as a background of a tag and put a transparent GIF pixel as a front image (of course dimensioned the same as your image on the background).

5- Use PHP embed images... Various ways of making code.

6- Use Adobe flash to browse images so they won't be copied with any kind of right click or page source...

7- This is the strongest one! Use an encrypting program that can encrypt all your code and with options like disable printing and Print Screen button.
(I had a demo from a computer magazine called HTML Guardian and it really works! White sheet of paper came out when I sent the page to print...)

* Attention that the first 6 are breakable!
I just mentioned them to prevent from any amateur as I said before :)

The 7th I still didn't find a way to break it :))

If you know any other way to prevent images by code, please post it here...

Cheers ;)

Comments (9)

Posted by Mani33 on August 30, 2009
Yes indeed that program I was telling about deactivate some functions on the keyboard like Print Screen and page printing or saving offline!
The only disadvantage is that the pages will stay encrypted like unsafe pages, AND IT'S NOT COMMERCIAL :(
Posted by Tan510jomast on August 30, 2009
good ideas Mani. a deterrent at most, but like another peer said, they will still find a way around it.
another thing, would not all these be futile with Print Screen?
i know it's not the original but amateurs who will not be picky about imae resolution. unless you have also one to prevent Prt Scr.
Posted by Mani33 on August 24, 2009
Thanks people, hope this was useful for you ;)
Posted by Nniud on August 24, 2009
Cool, thanks for sharing
Posted by Petroruth on August 23, 2009
Good information thank you. Peter
Posted by Goodcontent on August 22, 2009
Great information - keep posting
Posted by Littledesire on August 22, 2009
Till now I only knew how to disable the right click on a whole page. Thanks for the new tips!
Posted by EmeraldUmbrellaStudio on August 22, 2009
il check these out and add them to my blog and see what happends
Posted by Mildegard on August 22, 2009
Wow! How interesting! If I will ever make my own site I'll give it a try.

Comments (9)

This article has been read 1337 times. 4 readers have found this article useful.
Photo credits: Maen Zayyad.

About me

Lisbon, PT

February (1)

Stock Photography that BLOGS!

Interact, make friends, share tips and techniques, have fun. Dreamstime wants your ideas and thoughts whether you are a photographer, designer or regular user. Create a blog to tell your story, promote favorite images and photographers, post tutorials or simply exchange opinions with your with fellow dreamstimers.

Don't forget words and pictures go great together so make sure you choose some Dreamstime favorite pics to brighten your article. For inspiration, check out the hottest or the most useful blogs on the left.

Create a blog to tell your story, promote favorite stock images and photographers

Create your blog

My favorite articles


More favorite articles

Related image searches

Prevent Image Code Browser Save

Prevent related stock images