I have some pics that I will be posting on my website, but they are proprietary/copyrighted, and the owner would rather I disable downloading of them pics.
Can anyone suggest how I would go about doing that within the Drupal structure?

Thanks

Comments

styro’s picture

If the browser can view them, the browser can save them - in fact the browser has already saved them to disk before the page has finished rendering (browser caching). You need to educate your client that messing with right clicking only annoys their legitimate users and does nothing to project the images. I'd be very grumpy if some site disabled right clicking and stopped me using "open in new tab" on a link - I'd figure out how to configure Firefox to not allow sites to disable right clicking and then not come back.

Not that I'm suggesting this, but you'd have to embed them in some obnoxious flash viewer or java applet to raise the obscurity bar a little bit higher. There is still nothing stopping the visitor taking screen dumps and cropping them though.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ

rogerpfaff’s picture

you can view the page information (Seiteninformationen in german) where you get listed all the images which have been loaded on the page. if you take a look at www.stern.de where they protected their images with transparent gif expanded as overlay over the images you can spare disabling the rightclick because rightclicking and downloading an images will give you only a gif. but still you can get the images with the page information option in firefox. or some download manager program. or or or. even flash galleries don't protect your images. taking a screenshot, a little work in photoshop... finished.

---
Want to exchange with the community in chat for free and archived? Join us on drupalchat.me

cburschka’s picture

These days, Javascript filters are increasingly improving to block obnoxious code. The only success you can get through using this:

  <img src="protected.gif" onrightclick="alert('You have not yet figured out how to disable the right-click blocker?');" />

Is to alienate your visitors, who will either switch off javascript and continue downloading your pictures, or just leave and find a more user-friendly site.

Since the images are copyrighted, you can take action if you notice it published elsewhere - and it's very likely that someone notices and alerts you. Copyright law is quite effective without being supplemented by ineffective javascript code. The school of thought adopted by the media industry of trying to retain control over its content even while it is being displayed on the users' screen ultimately doesn't lead anywhere.

--

Sorry, rant over. The html tag above does pretty much what you want, with pretty much the results I described. If you are using a module to display these pictures, you will have to find the place where this tag is generated and add the "onrightclick" attribute to it.

ycim’s picture

Thanks to both of you. You are right (DOH!) if the user has viewed them, they have downloaded them!

But both of your comments went a long way towards the thought process of how to approach this with the client.

Thanks so much!

MtRoxx’s picture

I've been using Slideshowpro and the module that goes with it. It makes the images harder to find, allows groups to have their own slide show and keeps the client happy. http://drupal.org/project/slideshowpro There's more than one way to handle an issue! :)

Laugh and the world laughs with you....

Tazlord’s picture

Believe it or not, this WILL actually stop a good majority of people from trying to "download" your pictures. I know it seems like such a simple thing to just look in your browser's cache or grab the full URL to the image and just get the file but tons of people who use the Internet don't know how to do that. I have people asking me all the time, "How do I save this image to my desktop?" That being said, disabling the right-click menu or popping up an alert window DOES deter some people from saving your images. Nonetheless, if you're going to post copyrighted images on the Internet I highly recommend you watermark them visually and digitally.

As a side note, everyone's entitled to their opinion and much of that probably comes from experience. However, when someone asks for help on how to do something and you know how to do it (or know where to find out how), it would be nice to see the root question answered first... THEN post one's opinion about the usefulness or whatever of the request... Kinda like I just did.

hanoii’s picture

It's an old issue, but I got here googling and I though it's worth to note something I found using jquery here for reference if anybody else lands here:

http://yensdesign.com/2008/12/fast-tip-how-cancel-right-click-context-me...

and

http://www.gimiti.com/kltan/wordpress/?p=21

It's more or less the same, but in the second one it also tells how this can be applied to any jquery selecter just as imgs only.

Basically I did the following and it works in most major browsers except opera:

  <script type="text/javascript">
    $(document).ready(function(){
      $("img").bind("contextmenu",function(e){
        return false;
      });
    });
  </script>

PS: I totally agree that the client should be talked out of this approach but well, I did try and he still wants it.

Mambo89’s picture

when i hit F5 and then fast right click the image with that code:

$(document).ready(function(){ $("img").bind("contextmenu",function(e){ return false; }); });

i can save it...so it is far from efective:S sorry

gnicho’s picture

As expressed previously in this thread, there are always ways to defeat any code put in place to dissuade the lifting of content/images.

Remember that the concept behind right-click disabling code is to stop the casual image stealers, not the experts who know how to surf their temp files or write anti-right-click-disabling code. This is akin to an alarm system on a home- It stops the vast majority of casual burglars looking for the easy mark, but won't stop the experts who know how to defeat the system and pick locks.

I'm under the assumption that the majority of image lifters are probably just lazy and don't give a damn. They'll move on to a site that doesn't have any protective measures installed. If you're actively looking for an image or content to steal, and if it's something that you really want, you'll quickly figure out a way to get it. So be it. As someone else stated, above, "Don't want them downloadable? Don't upload them."

That's my two cents worth...

hassansr’s picture

where would the code go? yes I know it isnt perfect, but it'll make the client feel better

jrela2000’s picture

If you have a registered business name and trademarked logo, you can watermark your images with your logo and website url.

I do website banners and websites for businesses and when I either send clients proofs to approve or post examples on my blog/portfolio, I ignorantly watermark the image with a step and repeat logo/website url watermark in about a 20-30% opacity.

There's ways around disabling, but there are simple ways to protect yourself. At least with your watermark, you get publicity.

dufferin’s picture

Ok, disabled the right click might not be the ultimate way to prevent download... but would you not put a lock on your doors just because some guys are better at opening it anyway!

Makes no sens. It's a small protection.

I will gently rant here, but from my experience with Drupal, it would be nice if in general the end user is taken into consideration when writing modules or even drupal core.
I could dig tons of example where a module can become almost useless because not "real life end user" grounded.

So is there finally a CORE way around to prevent images to be downloaded by Mr Lambda...

sandip choudhury’s picture

Copy Prevention is a module - https://drupal.org/project/copyprevention for -
Disable text selection
Disable copy to clipboard
Disable right-click context menu on all site content
Disable right-click context menu only on images
And for disable many more . . .

Sandip Choudhury
http://hostingultraso.com