WWW FAQs: How do I stop people from stealing my images?

2004-01-08: There is no 100% reliable way to do this. The best technique available at this time is the "table background trick:"

<table background="MYIMAGEFILE"
border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="transparent.gif"
width="WIDTHOFMYIMAGE" height="HEIGHTOFMYIMAGE"></td></tr>
</table>

Of course, you must substitute the URL of your image for MYIMAGEFILE and the width and height of your image, in pixels, for WIDTHOFMYIMAGE and HEIGHTOFMYIMAGE. Also, transparent.gif must be a completely transparent GIF image, one pixel by one pixel in size. You can make a transparent GIF image using any quality graphics program. For more information, see the image formats entry.

This trick works by displaying your actual image as the background of a table, and displaying a scaled-up transparent image as the content of the table. The user, of course, sees your real image "shining through" the completely transparent GIF; but when the user right-clicks on the image to save it, they get the 1x1 pixel transparent GIF instead of your image.

Other techniques exist, including active X image display controls, JavaScript to override the right mouse click, and flash movies. Most users will not see your Active X control, not all users enable JavaScript, overriding the right mouse button menu is annoying to users, and the flash player is not always installed either although it is quite common. There is no perfect solution! A sophisticated user can definitely still get your image by using "view source" to learn the URL of the actual image file. Even if you use alternative techniques, despite their disadvantages, your image can still be stolen. You will find that all modern graphics programs include a "screen capture" feature. There is no 100% effective way to prevent users from using such a program to steal the image. It is true that they will get the image as it appeared on their screen, not the actual JPEG file, which means they will probably suffer at least a small loss of quality when saving it again. But this loss of quality can be very small. Sophisticted users may also know how to pull the original image file from their web browser's cache; they may even know how to remove an intact JPEG image from a Flash movie.

In short, there is no perfect solution; the best you can do is slow users down a bit using the table background trick.

You should, however, consider "watermarking" your images; add an unobtrusive but recognizable mark to the image itself, so that you can later prove that the image was stolen. You can add a mark that is obvious but not unpleasant to the user, or you can use more sophisticated software that does not leave a visible mark. Tools in this area are available from Digimarc and from ReaWatermark.

Share |

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!


Follow us on Twitter | Contact Us

Copyright 1994-2014 Boutell.Com, Inc. All Rights Reserved.