Disable Right-click to Protect Your Images on Shopify Using Code - Tutorial
Image copyrights are a huge deal, and for Shopify store owners looking for ways to disable right-click to protect their images using code, Ecom Experts has got you covered. Disabling right-click protects your product images from being downloaded off your site, ensuring content thieves cannot steal your product images off your website.
Without doing this, anyone can download your product image and use in whatever manner they deem fit. This then casts a shadow of doubt as potential customers could be left wondering about the authenticity of your brand.
This is a step-by-step guide to "Disable Right-click to Protect Your Images" on your Shopify store using code.
Here's how to "Disable Right-click to Protect Your Images" using code:
Disable Right-click to Protect Your Images Without App
Step 1: Duplicate your current live theme
From your Shopify admin, go to the Online Store, then click on Themes. To be secure we recommend you make a duplicate of your current live theme.
Click on actions, and from the drop-down menu choose duplicate. Once the duplicate is made, click on Actions again, but this time choose Edit code.
Step 2: Layout directory
From the navigation to the left, click on theme.liquid under the Layout directory. A new file should open on the right page.
Paste the following code on a new line above the closing head tag
<script>
/* don't expect this to work on older ie */
window.oncontextmenu = function () { return false; }
</script>
Step 3: Check if everything is working properly
Go to your store and give yourself a big pat on the back.
Final Word
However, before opting to use this code, please note that this code might not stop everyone from downloading your product image and may also annoy customers. Some browsers may not fire the code to disable right-click, and touch devices have no concept of a 'right' click, so the js would never fire on those.
So, from just disabling js to looking at the source of the page, using the browser console, taking a screenshot, using google images, or using a scraping tool like import.io - there's no effective way to stop the image from being captured in this case.
Keep your product images safe and away from the hands of content thieves by making sure you disable right-click on product images on your Shopify store.
If you have any more questions, please contact us at Ecom Experts.
Guides
- How To Create CUSTOM PRODUCT OPTIONS on Shopify 2.0
- How To Open External Links In A New Tab - Easy Shopify Tutorial
- How To Add Before And After Slider To Shopify - Easy 2022 Tutorial
- How To Add a Background Video To Shopify For Free
- How To Embed TikTok Videos To Any Shopify Page For Free
- Create Product Bundles Without The App - 2022 Easy Shopify Tutorial!
- Add Back to Top Button on Shopify Using Code: Detailed Tutorial
- How to Add A Custom Cart Icon on Shopify Using Code: Detailed Tutorial
- How to Add Breadcrumb Navigation to Your Shopify Store: DIY Tutorial Using Code
- How to Add Sales Countdown Timer to Your Shopify Store
- Cumulative Layout Shift Optimization: Causes and How to Measure It
- Ask How Customers Heard About Your Store On The Cart Page - 2022 Shopify Tutorial
- How to create a simple Quick View without app usage to your Shopify store
- Add A Multiple Currency Selector to Your Shopify Store Using Code Tutorial
- How to Create A Page of Collections on Shopify Using Code
- Show The Number of Products Left in Stock on Your Shopify Product Page
- Change the Number of Products in the Collection Page- Shopify Tutorial
- DIY Guide to Embed A YouTube Video in Shopify Product Page Tutorial
- Add a Message to the Shopify Product Pages by Using Product Tags - 2022 Easy Tutorial
- How to Add a Delivery Date Picker to Your Cart Page - Easy Step-By-Step Shopify Tutorial
- How To Create A Stunning Parallax Scrolling Section In Your Shopify Store Tutorial
- 6-step Tutorial on How to Add Wholesale To Shopify Store Without Shopify Plus
- How to Add Banner Image to Product Pages Without The App - Quick Shopify Tutorial
- How to add Hover Effect on Main Navigation Bar In Shopify
- How to Add A Gallery Page to Your Shopify Store without the App
- Disable Right-click to Protect Your Images on Shopify Using Code - Tutorial
- How to Auto Hide Sold Out Products on Shopify: DIY Tutorial
- DIY Code: How To Add Continue Shopping Button To Your Shopify Cart Page
- How to Create Custom Product Options on Shopify Without the App in 2022
- How to Select Variants By Clicking Their Images on Shopify
- How to Create a Custom Note Field on Your Shopify Cart Page
- How to Enable Custom File Upload Product Options on Shopify
- How To Show An Alternate Product Image On Your Shopify - Easy Step-By-Step Tutorial
- Step-by-Step Tutorial to Set Up Facebook Messenger Chat On Shopify Without App
- DIY Code To Add a Size Chart to Shopify Product Pages
- How To Redirect Shopify Customers After Login, Logout & Account Creation
- 4 Steps to Create a Sticky Header on Shopify: DIY Code
- How to Add Featured Product Slider To Your Shopify Store: Step-By-Step Tutorial
- Shopify Product Description Tabs: 5 easy steps to create your own collapsable descriptions
- Shopify Quick ADD TO CART Button On Collection Page Without The App
- How To Add a CUSTOM FONT To Your Shopify Store
LEARN MORE
Get ahead with the latest in e-commerce and Shopify Plus

How Headphones.com Mobile Speed Score Went From 21 to 76 In 48 Hours