How to disable the right click on image to prevent downloading images on Shopify?
by Kiet Huynh · July 26, 2018
Sell Online With Shopify
Trusted by millions of businesses worldwide
Sign up for a free trial and enjoy 3 months of Shopify for $1/month on select plans.
You want to disable right click and image download for your online store on Shopify. It’s very easy. You don’t have to spend money to install an application. You only add the javascript code bellow into your store.

| $(document).ready(function(){ $("body").on("contextmenu", "img", function(e) { return false; }); }); |
This script don’t allow right click on image. So the visitors can’t save images.
Related
Related Posts via Categories
Looking for Shopify Experts?
Hura Apps can help you take your store to the next level
Our team of experienced designers and developers can help you create a beautiful, high-converting Shopify store that will drive sales and increase customer satisfaction. From custom design to app development and optimization, we have the skills and expertise to help you achieve your eCommerce goals.
Get in touchTags: disable right clickjavascript
You may also like...
where do i put this code?
thanks
You can put this code into theme.liquid file
where do i put this code?
thanks
You can put this code into theme.liquid file
Where exactly? I am using the Debut theme.
Where exactly in the theme.liquid file? I use the Debut theme.
On your theme.liquid file to open it in the online code editor. In the online code editor, scroll down a bit until you see the closing body tag. Right before the closing tag, paste this code.
Remember put it in script tag 🙂
people can still copy text just not images. is there to completely disable right click? i seen some stores with this function not sure from app or something.
Copied the code into theme.liquid file and (assumed) theme.js as instructed and it worked however, you can see the actual code on my website. What I did was place the code only in theme.js at the very end and it worked perfectly.
Put it at the end of theme.js and worked perfectly. thanks!
you rock
Thank you. I keep coming across apps for this and i just want the code. Thanks!
Worked perfectly on theme.js.liquid file. Thank you so much!
TIP! Put the code at the VERY end of the coding sequence, PAST the original coding. Locked up all four images on my shopify store including an image on my homepage 🙂
Not working on Dawn theme for shopif 2.0, please help