How can I stop people stealing my blog images and photos?
Is there a command I can use to stop people right clicking and saving copies of my images? I get annoyed when they take my work and post it on their website without permission. Thanks.
This is a bit of a sticky question because it's just about impossible to stop people from getting to your image if they really, really want to. I'll show you a couple of ways to make copying images harder, but just like any other approach to security, it makes things more difficult, not impossible.
For example, you can take a screenshot or screen capture and then trim it down in a graphics editor to get a specific image, even if the image is locked up and hidden away on a page. You could also unwind and decipher the HTML source code to ascertain the URL of a specific image and simply request that URL directly in your browser, thereby sidestepping anything to do with a hiding technique.
But let's look at how to make things more difficult, then I'll suggest a couple of different ways you can perhaps gain advantage by not trying to block people copying your content...
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape")
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
You can see this in action by trying to right-click or control-click on the following image:
No menu should pop up (though I believe that this doesn't work in MS IE7)
The problem is, you can still drag the image off your browser screen and drop it onto your Desktop, thereby copying it. But we can address that too with a CSS trick this time: put the image in a single cell table as the background image:
<td style="width:192; height:146; background-image: url(american-flag.gif)">
This works by putting the image "behind" all the content on the page, but it's ugly and you have to be sure you have exactly the right dimensions of the image. Nonetheless, try it here:
Instead, I suggest that you might want to consider either adding a watermark to your image and not worrying about it, or actually encouraging people to rip off the image by supplying some HTML code immediately below the image, code that includes a link back to your site!
Here's how the first might look:
Personally, I find this to be an invasive and rather ugly solution, where everyone who visits the site has to suffer through the anti-piracy measures that you have in place for the precious few who would act inappropriately, so I'm not a fan.
The final way you might deal with the problem is to have a small code box immediately under the image that encourages people to take it including a link back to your site as the source of the image.
Here's an example of how that might look:
Not too horrible, fairly low key, and if they grab all the HTML code, you get a nice backlink for their effort, which is a good thing. Unwrap it all and here's the source code to the above:
<img src="http://www.askdavetaylor.com/1-blog-pics/american-flag.gif" alt="American Flag Icon" /><div style="font-size:85%;"><form><textarea rows="1" cols="40" style="font-size:85%"><img src="http://www.askdavetaylor.com/1-blog-pics/american-flag.gif" alt="American Flag Icon"><div style="font-size:75%">Image source: <a href="http://www.askdavetaylor.com/">AskDaveTaylor.com</a></div></textarea><br />Add This Image To Your Site: Use our handy HTML code.</div>
So that works, it's nice, but, blech, what a complicated way to add an image. A lot harder than just using the ole' Flickr copy and paste function!
That gives you all the major ways you can solve your image theft problem. I leave it to you, dear reader, to decide which of them, or which combination of them, will work best for you when considering both the effectiveness of the approach and the level of additional work involved in adding images to your site or blog.
✔ How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....✔ Can I embed a Facebook search box on my blog site?
I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...✔ Can I use CSS for drop shadows on my blog?
I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....✔ How can I embed interactive photo panoramas on my site/blog?
I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...✔ How can I create a Twitter search URL shortcut?
I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
I do have a comment, now that you mention it!
Check This Out Too...
Look for Answers
All Our Categories
Apple iPad Help
Articles and Reviews
Auctions and Online Shopping
Blogs and Blogging
Building Web Site Traffic
Business and Management
Computer and Internet Basics
d) None of the Above
Google Gmail Help
Google Plus Help
Industry News and Trade Shows
iPhone and Cell Phone Help
iPod, Sony PSP and MP3 Player Help
Kindle Fire Help
Mac OS X Help
Pay Per Click (PPC) Advertising
Search Engine Optimization (SEO)
Shell Script Programming
Tech Support Video Help
The Writing Business
Twitter, LinkedIn and Social Network Help
Unix and Linux Help
Video Game Tips and Help
Windows PC Help
Find Me on Google+
ADT on G+