Disable "Save Picture As" in wordpress

3 replies
  • WEB DESIGN
  • |
Hello ,

I am new at this forum and also new at webmastering. I am currently at my third website project. Although making them in wordpress barely counts.

I am using the Wordpress template "Awake". I have created a photo gallery. Each gallery photo needs to be uploaded with a post.

I have read that it is impossible to protect images from being stolen , but it can be slightly prevented (or at least delayed) by most popularly:
(a) overlaying a transparent png or gif over the image
(b) adding code to disable "save picture as" (not sure if this is done by completely disabling right click)

I am having issues accomplishing any of these, because the "AWAKE" wordpress theme is all "automatic". I cannot find the "post" html code created by wordpress to upload my gallery photo. I do not see the code specifying the location of the picture, the size, etc.....its all a template

1) How do I find and edit the code of the uploaded gallery image? And then what is the code I need to insert to disable "save picture as"

2) Once I find that code, how do I overlay a transparent gif or png exactly on top?

Please note that the way this gallery works on the "Awake" template is that you go to the "Gallery" page, then you see the picture thumbnails. When you click on the thumbnail, a box opens and expands the image, then you can expand the box even bigger. I can right click and select "save picture as" on the expanded boxes. That is what I need to disable. I do not care about the thumbnails.

Also note that to upload the picture on the gallery, using the wordpress template "Awake", I have to create a "post" and assign it to a "category" that category "posts" the image in the right gallery..all I need to do is insert the correct url's of the thumbnail and the full size image on a box, so I do not see any of the code that I could edit! There is a bigger box on top of the "post" or "page" setups where I can insert HTML and also "shortcodes" but I only needed to enter "shortcodes" on the Gallery Page setup. None in the post ....

Please help!

Jim
#disable #save picture as #wordpress
  • Profile picture of the author StandUpAndSpeak
    Hi Jim,

    In order to do what you want to do, you'll need to edit the theme files themselves. Particularly, I think, the way to go is to edit the javascript that controls the lightbox pop-up where the large image is displayed. You'll want to add a piece of code that disables the right-click capability while it is being displayed. (Be sure to make a backup of the file when you make that change, so that when the plugin updates you won't have a hard time replacing it.)

    Really, though, you're ultimately fighting a losing battle. There are tons of ways to get the picture, from checking through the source to determine the URL of the picture and going straight there, to taking a screenshot of it when it is displayed in the lightbox.

    The best you can probably do is embed some sort of watermark on the large images to deter theft (the way that iStockPhoto does), and edit your .htaccess file to prevent people from hotlinking to your images and sucking your bandwidth. But if somebody is intent on getting at your picture, they'll find a way to do it.
    {{ DiscussionBoard.errors[2828799].message }}
    • Profile picture of the author jimmoore
      Thank you very much. I understand this is a lost battle, but I want to at least delay the copycat's victory. Most of the people who will look at my website galleries are not web savvy.

      With that in mind:

      1) How do I find the javascript that controls the lightbox pop-up where the large image is displayed so I can edit it?

      2) What is the piece of code that disables the right-click capability while the images are being displayed ?

      3) How do I find and edit my .htaccess file to prevent people from hotlinking to my images ?

      Thanks again.
      {{ DiscussionBoard.errors[2830114].message }}
      • Profile picture of the author StandUpAndSpeak
        The Javascript is going to be part of the theme files. they're located in the wp-content/themes/name-of-your-theme directory.

        There are probably half a dozen ways to do that in javascript. I don't have the mental wherewithal just at the moment to write one out, but I'd probably just piggyback on whatever event loads the lightbox to disable the context menu while it is loaded. I'm sure Google can help you out with that one.

        Your .htaccess file, if you have one, is located in the root directory of your website. If there isn't one, you can create one there. Again, Google ".htaccess stop hotlinking" and you'll find info on the appropriate syntax to use to prevent that.

        Good luck.
        {{ DiscussionBoard.errors[2836328].message }}

Trending Topics