Jeyycie Posted April 18, 2022 Posted April 18, 2022 (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 April 18, 2022 by Jeyycie
tuanphan Posted April 19, 2022 Posted April 19, 2022 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!)
Jeyycie Posted April 19, 2022 Author Posted April 19, 2022 Hi Tuanphan, thank you for your response, and no I'm completely incapable of writing any code.
tuanphan Posted April 22, 2022 Posted April 22, 2022 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> Beyondspace 1 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!)
Jeyycie Posted April 22, 2022 Author Posted April 22, 2022 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.
Solution Beyondspace Posted April 22, 2022 Solution Posted April 22, 2022 Or you can try img { pointer-events: none; } It only allows to download the whole page, not the image tuanphan, Obi-Wan and Tnova 2 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Jeyycie Posted April 22, 2022 Author Posted April 22, 2022 (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 April 22, 2022 by Jeyycie
ShortAngryViking Posted August 24, 2022 Posted August 24, 2022 Hi @tuanphan, I tried the code to Settings > Advanced > Code Injection > Footer but on my mac i can still download, and drag and drop to desktop https://ray-cone-ap64.squarespace.com/ in footer section Line 18
Turbiville Posted October 5, 2023 Posted October 5, 2023 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?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment