Scale your business with our modular plugins.
Home » Blog » How to Disable Right Click on WordPress Images

How to Disable Right Click on WordPress Images

October 30, 2025||By Umar Shad

Have you noticed someone stealing your images without your permission? If you are a victim of this, we’ve got something for you. This article shows you how to disable right-clicking on WordPress images and restrict image downloads!

Why Disable Right Click on WordPress Images?

Nowadays, anyone can download your images with a few clicks. This can be a significant problem if you invest time and resources in creating visually appealing images for your content, infographics, and other materials. Apart from adding watermarks and similar features, there’s a better option to ensure no one steals your images.

If you’re serious about protecting your website, you can disable right-clicking on your images. This will help you fight image theft and reduce unauthorized downloads.

The following section will outline the pros and cons of doing it, so you can better understand the concept.

Pros and Cons of Disabling Right Click

Before we proceed, understanding the pros and cons of disabling the feature on your WordPress site is essential. It will help you decide whether doing it is a good idea for your website.

Pros

  • Prevent image hotlinking – if someone has your media file URL, they embed it directly on their website without uploading it to their server. Removing the right-clicking feature will prevent this (more on image hotlinking later in this guide).
  • Keep your original work – if you pay for the images, you must consider adding a layer of security. This way, you can keep the original work and restrict every external download.

Cons

  • Not optimal for every visitor – disabling the feature can be problematic if you share code snippets on your site. Visitors need to copy the snippet rather than type it manually.
  • Won’t work every time—users can still steal your images by blocking JavaScript in their browser or taking a screenshot.

Now that you understand how disabling right-clicking can protect your website’s content, let’s explore different ways to do so in WordPress.

How to Disable Right Click on WordPress images

There are two main ways to block right-clicking on your WordPress site:

  1. Using a Plugin
  2. Manually with some code

We will show you both methods so you can choose the option that best suits your requirements and preferences.

Without further ado, let’s proceed with the process.

1) Disable Right-Clicking on WordPress images using a Plugin

We will be using these plugins:

  • Disable Right Click for WP
  • WP Content Copy Protection & No Right Click

Both plugins perform the same function, allowing you to use either one. Now, let’s see how to use them.

1.1) Disable Right Click for WP

The plugin does exactly what its name says: it disables right-clicking in WordPress. This doesn’t just mean that you can’t copy an image; it also means that you can’t copy an image. It also means you can’t copy text, search Google for terms you’ve highlighted, or do anything else using the right-click button.

If you believe this is the best option, let’s proceed with the step-by-step process to complete the task. The first step is to install Disable Right Click for WP on your website. Since it is a free plugin, you can install it directly from the WordPress plugin repository.

Go to Plugins > Add New.

Search for the plugin, install it, and then activate it.

install disable right click on wp

When you activate the plugin, it will work on your entire website. If you’re logged in as the admin, you will have total control and will be able to perform a right-click on your site.

It also disables keyboard shortcuts such as:

  • CTRL+C, CTRL+X, CTRL+V: Copy, Cut, and Paste
  • CTRL + U: View Source
  • F12/CTRL+SHIFT+I/CTRL+SHIFT+K: Inspect Element

Now, people won’t be able to download any images from your website. Since this doesn’t affect admins, you need to log out or open a new incognito window to see the plugin in action.

Disable right-click for WP Alerts to users

The tool can also show a warning/message when someone right-clicks on your content. This can be useful for letting website visitors know they can’t copy images from your site.

To do this, go to the plugin’s configuration under the WordPress settings.

In the general settings, you will see the option to enable the warning.

After you enable it, front-end users will see a message informing them they can no longer right-click on your website.

Overall, this plugin has a minimal configuration, is easy to use, and it’s free.

1.2) WP Content Copy Protection & No Right Click Plugin

WP Content Copy Protection & No Right Click Plugin is another good option to disable right-clicking on your WordPress site. Like the other plugin, this tool lets you block every keyboard shortcut. Let’s see how to set up this plugin.

First, install WP Content Copy Protection & No Right Click on your website, and then activate it.

install WP Content Copy Protection & No Right Click

Once you have completed the activation, you will see the plugin’s settings on the left-hand side.

copy protection settings

The default configuration options are suitable for most sites, but you can easily adjust them to meet your specific needs.

copy protection options

Remember to save the changes after making any changes.

Overall, blocking right-clicking on your WordPress site with plugins is a straightforward and convenient process. However, if you don’t see results after using one of these plugins, it is because of your caching. In that case, you’ll need to clear the cache.

Alternatively, if you don’t want to use plugins, you can disable right-clicking on WordPress images programmatically.

2) Block Right-Clicking on WordPress Images Programmatically

Plugins are quick solutions for individuals who are unfamiliar with coding. But they can slow down your site.

Continue reading this section if you prefer not to install additional plugins and would like to use a bit of code instead. We will provide you with a simple code that you can use; however, a basic understanding of coding is recommended.

Note: We will be editing some of the theme files, so we advise you to create a child theme. This way, you won’t lose any modifications when the parent theme gets updated.

First, go to Appearance > Theme File Editor in your dashboard. You will see all the PHP and CSS files in the theme folder on the right-hand side. Scroll down and find the footer.php file.

JavaScript code to disable right click

Once you have found the file, add the JavaScript code shown below to it.

<script type="text/javascript">
jQuery(document).ready(function () {
//Disable cut copy paste
jQuery('body').bind('cut copy paste', function (e) {
e.preventDefault();
});
//Disable mouse right click
jQuery("body").on("contextmenu",function(e){
return false;
});
});
</script>

The file will look like this.

Code to disable right click in WordPress

After pasting the code, update the file. That’s it! This way, you can disable right-clicking on your WordPress images without using third-party plugins.

Bonus: Other Tips to Protect Your Content

You can also utilize various other options to safeguard your content from online pirates and thieves. Let’s have a look at some of them:

  1. Protecting the content with copyright law
  2. Watermarking images
  3. Disabling hotlinking

By including a copyright notice on your website, you can let people know that your content is your intellectual property and shouldn’t be used without your permission. This is useful because not all users are aware of the consequences of stealing content and may not be acting intentionally.

You don’t have to make your notice too hard to understand. Just tell people how they can and can’t use your property. For example, you might decide that people can use excerpts and links from your site. You can clarify that you or your website should receive full credit and request a link to the original piece.

We recommend adding your copyright notice to a visible location on every page of your website, such as the footer or sidebar. This way, you’ll also have the legal right to do something if necessary.

2) Watermark Images

Adding a watermark is one of the most effective ways to prevent people from stealing your photos on WordPress. If you add a watermark to your pictures, everyone who sees it will know where it came from.

You can use plugins to automatically add watermarks to your images. Most of these plugins allow you to adjust the transparency of the watermark. This will enable people to see the picture even though they can only see a bit of the text or logo. On the other hand, you can manually add watermarks to your photos using a dedicated tool, such as Adobe Illustrator.

3) Disable Hotlinking

Hotlinking is a common issue happening nowadays. When people embed images on their website directly from your web server, it is known as hotlinking. So when a website visitor lands on the target page, the image will be displayed directly from your server.

This doesn’t seem right.

This can lead to increased bandwidth usage and website uptime issues. If you use a web hosting provider that charges you for bandwidth consumption, you will start paying them more for the extra data transfer. Additionally, since the website requests images every time a visitor visits, this results in an additional HTTP request.

This will also affect the speed and performance of your website. Overall, disabling hotlinking is a good idea. To do this, copy the code below and paste it into the .htaccess file in the root directory.

#disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomainname.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

You need to replace yourdomainname.com with your actual domain name.

Troubleshooting Tips and Tricks

  • Right-click still works after enabling protection: Clear your site and browser cache, and ensure that the plugin’s JavaScript isn’t being deferred or minified by a caching plugin.
  • The plugin isn’t working in some browsers: Update the plugin to its latest version and test again. Some browsers may require additional script permissions.
  • Right-click protection conflicts with gallery plugins: Temporarily disable lightbox or gallery extensions to see if they override the right-click script, then re-enable one at a time.
  • Disabling right-click also blocks text selection or links: Adjust the plugin’s settings or code snippet to target only image elements (img tags) instead of the entire page.
  • Protection works on desktop but not mobile devices: Check whether your plugin supports mobile browsers or add a custom JavaScript snippet for touch events.
  • Images can still be copied using “Inspect Element”: Right-click disables only the block’s surface-level access. Consider adding watermarks or utilizing a CDN with anti-hotlinking capabilities for enhanced protection.
  • Site speed drops after enabling the plugin. To optimize performance, consider disabling unnecessary scripts or combining the protection plugin’s script with your main JS file.

Frequently Asked Questions

Now, let’s take a look at some frequently asked questions and answers about this topic.

Why should I disable right-click on images in WordPress?

Disabling right-click helps deter casual image theft and hot-linking, making it harder for users to simply “Save image as…” or drag an image from your site to their own.

Will disabling right-click prevent all image theft?

No. It’s a deterrent, not a full proof solution. Users can still take screenshots, use developer tools, view source or bypass the block via browser settings.

Does disabling right-click affect user experience?

It can. Visitors who expect to right-click (for example to open images in new tabs, save for personal use or inspect) may find the site restrictive, so balance protection with usability.

Can I disable right-click only on image pages or galleries?

Yes. Many plugins or custom code let you target specific post types, pages, galleries or user roles (e.g., only disable for non-logged-in users) rather than the whole site.

Is it better to use a plugin or custom code to disable right-click?

Both have merit. Plugins are quicker and often come with additional protection settings; custom code is lighter but requires more technical skill and manual updates.

How do I handle disabled right-click on mobile or touch devices?

Right-click blocking may not work consistently on touch devices (long-press, gesture menus) and sometimes interferes with scrolling or swipe interactions—test on mobile before going live.

What other methods should I combine with disabling right-click for better image protection?

Use additional layers, such as watermarks, disabling hotlinking, serving images as background CSS, and adding copyright notices, to make image misuse more difficult and discourage theft.

Conclusion

Content or image theft is common these days. Users can copy images for malicious purposes without considering the consequences. Still, if you disable right-clicking on your WordPress website, visitors won’t be able to download your images without your permission. This guide demonstrates various methods for blocking right-clicks, both with and without coding.

The easiest way to do this is by using a dedicated plugin. With a tool like Disable Right Click for WP or WP Content Copy Protection & No Right Click Plugin, you can disable right-click on your images within minutes. On the other hand, if you think adding an extra plugin isn’t the right choice and you have some coding knowledge, you can write a bit of code.

Finally, we saw extra measures you can take to protect your content, such as

  1. Using copyright
  2. Adding watermarks to your images
  3. Disabling hotlinking

We hope you have found this article helpful and gained a deeper understanding of how to disable right-clicking on WordPress. If you did, feel free to share this content with your fellow bloggers. You can check out our blog for more tutorials.

Similar articles you might like:

Log into your account
Forgot your password?