Jump to content

Remove downloadable pictures for website data and right click

Go to solution Solved by Beyondspace,

Recommended Posts

Posted (edited)

Site URL: https://www.cesardumayhouard.com/

Good evening, I've just launched my website, and since it is my portfolio I want to protect my images.

And surprisingly any person can right click on any of my pictures and download them. So I want to know if it is possible to disable that for my website ?

 

I also noticed that, (even for some other website), you could just right click and then select "inspect element", which then shows you the HTLM and CSS code of that page, and you can clearly see the specific private address of the pictures an videos, and download them that way.

But I know that you can hide that data, and prevent a download, which something I've noted on some other website.

 

So If you can help me insure some picture security I will be grateful, thank you.

Edited by Jeyycie
Posted

Hi,

If you are a coder, There are dozens of ways you can get a photo on a website, no matter how protected it is.

The codes on the internet, only partially help prevent, for those who are not coder, for example: block right click, block drag image to download it,..

If you still need the code, we can give the code

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Do you still a code to prevent this?

Add to Settings > Advanced > Code Injection > Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function () {
  $("body").on("contextmenu",function(e){
    return false;
  });
});
</script>

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Unfortunately this can only be done on a premium account, I have a basic one, I cannot inject code, but only using the basic CSS customisation on the design menu.

Posted (edited)

Thank you @bangank36 it works, and it also seems to hide the HTML code of each images, when you used the "inspect element" tool.

Thanks for your help.

Edited by Jeyycie
  • 4 months later...
  • 1 year later...
Posted

I tried the code above and it works on desktop, but on my iPhone I can hold down over a pic on my side and "save image" and it lists the image url and file name.   Is there a way to block this on mobile as well?

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.