Remove right click

Solved
Highlighted
Excursionist
35 0 11

Hi,

I am trying to remove the right click option on my website to prevent others from saving my images/products. What is the best way to do this or to remove the save as function. 

Thanks.

0 Likes
Highlighted

I have seen one app for this: https://apps.shopify.com/disable-right-click-1

You can also use javascript to code it.

Shopify Store Setup
Customize Shopify Theme
Develop Custom Shopify App

For any Shopify Developments : http://expertsinshopify.com
1 Like
Highlighted
Shopify Partner
5885 861 1971

Hello, @Diamond2 

Welcome to the Shopify community!
Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
1 Like
Highlighted
Excursionist
35 0 11

Hi,

Please see my website link: https://www.temporary-url.com/ED88 

I basically want to prevent people from saving my images or dragging to desktop so they cannot see our product file name.

Thanks.

0 Likes
Highlighted
Excursionist
35 0 11

Hi,

Thanks for your response. I saw the app you mentioned but I'd be more interested in adding a code to the entire site. Would you know how to do this?

Thanks

0 Likes
Highlighted
Excursionist
35 0 11

@MAQ_UAE Thanks for your response. Are you able to provide the coding to use?

0 Likes
Highlighted
Shopify Partner
1350 181 429

This is an accepted solution.

You can go into your theme.liquid file in your Assets folder and add this to before the closing </head> tag:


<script>
$(function(){
document.addEventListener('contextmenu', event => event.preventDefault());
});
</script>

Though this can be annoying to users. Use it if you want but I generally wouldn't recommend it. 

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
1 Like
Highlighted
Excursionist
35 0 11

Hi @Ninthony,

Thanks for the reply and the code. I really appreciate it.

Why do you say it is annoying for users and do not recommend it? Is there a better way to solve this issue. I essentially want to prevent competitors from saving my images or viewing the image file name.

Thanks

0 Likes
Highlighted
Shopify Partner
1350 181 429

I only say that because if they really want to get your images they are going to be able to find ways around it anyway, and anyone who legitimately wants to use right click to say copy some text from your website or something wont be able to use the right click menu. I mean it's probably not a huge deal, I'm just saying there are ways around it anyway, so anyone who REALLY wants to take your pictures, you wont really be able to stop them. It will probably slow them down though.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
1 Like
Highlighted
Excursionist
35 0 11

Got it. Thanks so much for the help and explanation.

0 Likes