Resolve

A collaborative online community that brings together photographers and creative professionals of every kind to find ways to keep photography relevant, respected, and profitable.

Have an idea for a post?

Want us to find an answer to your question? Interested in becoming a contributor?Email us

‹ Home

June 4th, 2018

How to Protect Your Images

Posted by liveBooks

Piracy and image theft can be an issue among content creators and most of the time it’s only one right-click away. One way of ensuring ownership on your images is adding watermarks on each item before uploading it online. While this is a common practice among some artists, we understand you may be hesitant to use them. Here are the pros and cons of using watermarks on your online portfolios.

The easiest way for someone to take your photograph is to right-click on it and save the image on their computer or to right-click and copy the image address. But what if we could disable right-clicking on all your images?

The way to disable right-clicking on liveBooks requires utilizing the HTML content block feature. And it’s easy! All you have to do is copy and paste a HTML snippet that will be provided in this article into a HTML block from your content editor and publish that new change. You can disable right-clicking on images on your entire website or on specific pages.

Follow these instructions to disable right-click on images throughout your entire website:

  1. In your Content editor, under Global Content, select Footer. 
  2. Create an HTML content block within the footer.
  3. Copy and paste this HTML snippet to the HTML content block you created: <script type=”text/javascript”>
    //<![CDATA[
    /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Disable context menu on images by GreenLava (BloggerSentral.com)
    Version 1.0
    You are free to copy and share this code but please do not remove this credit notice.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
    function nocontext(e) {
    var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
    if (clickedTag == “IMG”) {
    alert(alertMsg);
    return false;
    }
    }
    var alertMsg = “Image context menu is disabled”;
    document.oncontextmenu = nocontext;
    //]]>
    </script>
  4. Save, publish and you’re done!

If you wish to only add this feature to a specific page, follow these instructions:

  1. In the Content editor, click into the Page you wish to add this feature to.
  2. Create an HTML content block to this page. 
  3. Add the following HTML snippet to the HTML content block you created: <script type=”text/javascript”>
    //<![CDATA[
    /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Disable context menu on images by GreenLava (BloggerSentral.com)
    Version 1.0
    You are free to copy and share this code but please do not remove this credit notice.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
    function nocontext(e) {
    var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
    if (clickedTag == “IMG”) {
    alert(alertMsg);
    return false;
    }
    }
    var alertMsg = “Image context menu is disabled”;
    document.oncontextmenu = nocontext;
    //]]>
    </script>
  4. Save, publish and you’re done!

Now when you or anyone else will right-click your images, a notification pop-up will show up instead. It will look something like this, depending on the operating system installed on the visitor’s computer, phone or tablet. (For phone or tablets, these chances affect the action generated by long pressing on your images.)

The default message when trying to right-click an image is ‘Image context menu is disabled’, but you can replace it to whatever you like in the code above. If you prefer not to show the alert box at all, just delete this portion of the code:

alert(alertMsg);

return false;

}

}

var alertMsg = “Image context menu is disabled”;  

Our support specialists are happy to help you make any changes you want on your liveBooks website. Book a call, send an email or chat directly from our website!


Leave a reply




 

FREE EBOOK

Learn how to engage your audience and
build brand recognition across social
channels. Learn more...

Free eBook

Search Resolve

Search

READY TO GET STARTED?

Pick your package. Pick your design.
No credit card required.

Start 14-day Free Trial
Compare packages