How to Disable Right Click on WordPress Images

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 will show you how to disable right-click 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 big problem if you spend time and resources creating beautiful images for your content, infographics, and so on. Apart from adding watermarks and this like that, there’s a better option to make sure 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 show you a couple of pros and cons of doing it, so you’ll better understand the concept.

Pros and Cons of Disabling Right Click

Before we go further, knowing 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.


  • Prevent image hotlinking – if someone has your media file URL, they embed it directly on their website without uploading it to their server. Removing 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.


  • 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 instead of typing it manually.
  • Won’t work every time – users can still steal your images by blocking JavaScript on their browser tab or taking a screenshot of the picture.

Now that you understand how disabling the right click can keep your website’s content safe, let’s look at different ways to do this on 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 pick an option based on your requirements and preferences.

Without any further ado, let’s see 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 do the job, so you can use any of them. 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 the right-click on WordPress. This doesn’t just mean 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 think this is the best option, let’s get into the step-by-step process to complete the task. The first thing you need to do is, install Disable Right Click for WP on your website. Since it is a free version plugin, you can directly install it 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, but if you’re logged in as the admin, you will have total control and will be able to perform 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 use an 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 to you let website visitors know that 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 telling them they can no longer perform 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. Similar to the other plugin, this tool allows you to 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 ok for most sites, but you can easily adjust them to your needs.

copy protection options

Remember to save the changes after making any changes.

All in all, blocking right-clicking on your WordPress site with plugins is easy and convenient. 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 people who don’t know much about coding. But they can slow your site down. Keep reading this section if you don’t want to install more plugins and prefer to use a bit of code. We will provide you with a simple code that you can use but a minimal 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 this JavaScript code to it as shown below.

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

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 use many other options to save 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

1) Add a Copyright Notice

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 know 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 get full credit and ask for a link to the original piece.

We suggest adding your copyright notice somewhere that can be seen on every page of your website, like 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 best ways to stop people from stealing your photos on WordPress. If you add a watermark on your pictures, everyone who sees it will know where it came from.

You can use plugins to add watermarks to your images automatically. Most of these plugins let you change how transparent the watermark is. This allows people to see the image 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 like 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 some website visitor land on the target page, the image will be displayed directly from your server.

This doesn’t seem right.

This can end up in more 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. Also, since the website requests images every time whenever they have a visitor, that’s an additional HTTP request.

This will also cause the speed and performance of your website. Overall, disabling hotlinking is a good idea you can do. 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\.)? [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)? [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

You need to replace with your actual domain name.


Content or image theft is common these days. Users can copy images with bad intentions without considering the consequences, but if you disable right-clicking on your WordPress website, visitors won’t be able to download your images without your permission. This guide showed you different methods to block right-clicking both with or 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 is not the right choice and you have some coding knowledge, you can use 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 learned more about disabling 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: