Jump to content

How can I prevent people from right clicking and saving/copying my images on my website?

Recommended Posts

I'm uploading images that I dont want people ripping from my webpage, or inspect element.

is there anyway I can potentially hide the right click or get rid of both the right click and encrypt the link from the inspect element.

i'm using the mark novo template.

Edited by swoopnebula
Link to comment
  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

  • 7 months later...

Disabling right-clicks reduces the usability of your website. It can make users very frustrated and leave the site. If you disable it, users cannot right click to:

  • Open a link in a new tab
  • Lookup a word
  • Translate a word/phrase
  • Read aloud a section of text

And bear in mind that it does nothing to prevent copying of images. It will still be possible for anyone to download images or text from the website. 
For more information, see Preventing visitors from downloading your images and audio. This Squarespace guide covers several other approaches you can take to protect your images and discourage unlawful copying.

 

Edited by paul2009

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
  • 1 year later...

Here are some good resources, but it will only prevent saving by right-clicking, there are many other ways to download image that are online. The best thing you can do is scale down your images and decrease the quality (to just within acceptable levels for web) and add copyright info to the metadata. It's a tricky problem for artists and creators online, sadly without a great solution. Good luck!

https://support.squarespace.com/hc/en-us/articles/206542457-Preventing-visitors-from-downloading-your-images-videos-and-audio

Please like and upvote if my comments were useful to you. Thanks!

Zygmunt Spray
Squarespace Website Designer
Contact me: https://squarefortytwo.com/ 
🔌Ghost Squarespace Plugins (Referral link)
Buy me a coffee

Link to comment
  • 1 month later...
On 11/15/2022 at 4:31 PM, catalienne said:

Great guide @tuanphan. Just making sure the right hand click disable script code still lets Google index the websites?

Thanks 🙂

I'm not sure, but quite a few people use that code and haven't seen anyone mention indexing, you're the first to mention it.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 11/15/2022 at 9:31 AM, catalienne said:

Just making sure the right hand click disable script code still lets Google index the websites?

It will not affect indexing of the website but, as I explained above, it will reduce the usability of your website and potentially frustrate genuine visitors.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
  • 1 month later...

Hello, I’m undecided about Squarespace over one issue: The lack of a function to disable right-click downloading of photos. Apparently, this is so much more straightforward with Wix. But for many other reasons, I prefer Squarespace.

Squarespace tells me that if people want to steal images, they’ll do it anyway, e.g., screenshots, so there’s no reason to disable right-click downloads. I have three responses to this:

(1) Do you lock your door when you go out? Because I found (from experience) that locking the door doesn’t deter a determined burglar. But locked doors do deter opportunists.

(2) Copyright notifications when trying to right-click on images on other platforms are a good reminder that, while you can go ahead and make a screenshot, this image doesn’t belong to you. Maybe I’m an optimist, but I think that good ethical practices in photography should be promoted in any way possible, rather than just assuming that there’s no point (and making it easy to download anything and everything).

(3) Screenshots are usually lower resolution. So, you might think you’re stealing an iPhone 10 but you’re actually getting the iPhone 5.

I’ve seen a few discussions on this forum about disabling right-click downloads, but it seems complicated, because I know nothing about code, and because people have found that disabling right-click downloads on a desktop does not necessarily disable it on a mobile phone. Also, things change, and many of the discussions on this forum are many months old now.

Please would anyone be willing to talk me through the process, with the current version of Squarespace (7.1, I believe?).

Thanks in advance.

 

Link to comment
  • 4 weeks later...

I use the following code, inserted under Setting->Advanced->Code Injection in the Header section to prevent users of my SS 7.0 website from downloading my images and right-clicking to save:

<HTML>
 <HEAD></HEAD>
 <BODY on contextmenu="return false;" onselectstart="return false;" ondragstart="return false;">
 </BODY>
</HTML>

<script>
document.oncontextmenu = function(e){
   var target = (typeof e !="undefined")? e.target: event.srcElement
   if (target.tagName == "IMG" || (target.tagName == 'A' && target.firstChild.tagName == 'IMG'))
       return false
}
</script>

 

This code works as intended; however, I have found that it also screws up the editor, e.g., I cannot mouse drag over text to highlight while editing, nor copy/paste, nor see my cursor occasionally. If I delete that code, editing returns to normal, and reinsertion causes those problems to reappear. My work around at the moment is to do exactly that: delete, edit, reinsert the code. Yes, it's kludgy, but that's the best I have.

I'd like to add code that checks to see if I am logged in (as the website owner). If true,  the script would be disabled permitting me to edit without problems. If false, ie., any other users views my pages, their ability to use context menus and right-click saves would be disabled. The key is how to add code to ID the owner as the one making the edits and then stop the code from functioning while the owner is editing.

I have no experience with coding, and picked up the aforementioned code from a user on this forum. So, if anyone has any suggestions on how to modify this code so I can retain the functionality (prevent download, right-click and swipe to desktop saving), but at the same time permit my editing, please post a reply.

 

Thank you in advance for your help,

Bob

Edited by Bob_B
Added information for clarity

I am a retired university professor (microbial genetic research), an avid photographer, and the designer of my own webpage, www.belasphoto.com

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.