Made in Europe, buy from Europe.

Black Friday

65% off Annual plans

25% off Lifetime · 10 per week

Ends December 2

Get the deal →

12 min read

How to Disable Right-Click on Images in WordPress

Disable right-click in WordPress on one gallery or your whole site, no code needed. See what it stops, what it can’t, and how to cover iPhones too.

How to Disable Right Click on Images in WordPress Using Modula’s Protection Extension

Can you disable right-click in WordPress? Yes. With Modula’s Image Guardian it’s a couple of switches and no code, and you can do it for one gallery or for your whole site.

Here’s the moment it’s built for. You post a preview gallery for a couple on Friday night. By Sunday, half of it is on Facebook, cropped and filtered, a week before you’ve delivered the edited set.

Nobody hacked anything. They right-clicked and hit Save image as.

Take that menu away and most casual copying stops. Not all of it (a screenshot still works), so think speed bump, not lock. We’ll also cover phones, because on an iPhone the usual right-click blockers do nothing at all.

In short

To disable right-click on images in WordPress:

  1. Install Modula and Modula Pro, on the Trio plan or higher.
  2. Switch on Image Guardian in Modula → Extensions.
  3. Open your gallery, click Protect → Image Guardian and turn on Block right-click on images.
  4. To cover every page, turn on Protect the whole site in Modula → Settings → Protection.
  5. Test it logged out in a private window, then on your phone.

Why disable right-click on images?

Disabling right-click on images works because most image copying is casual. Someone likes a photo, right-clicks, saves it and posts it elsewhere without a second thought. Make that harder and most of them move on.

If you’re a photographer, artist or designer, your images are your babies, and you know how many hours went into each one. Blocking right-click helps in three ways:

  • It backs up your copyright. In the U.S., copyright protects your work “the moment it is created and fixed in a tangible form.” Registration is voluntary, though you’ll need it before you sue over a U.S. work (U.S. Copyright Office FAQ, checked October 2026). Blocking right-click doesn’t create rights. It makes ignoring them less casual.
  • It sets expectations. A blocked right-click with a short message tells visitors these photos aren’t free to take.
  • It keeps client previews private. Proofs and unapproved product shots stay on your site instead of being shared before anyone’s paid for them.
Blocking right-click stops Save image as, the iPhone long-press in the Modula lightbox and most casual copying, but not screenshots, Shift + right-click in Firefox, developer tools, JavaScript off or unblocking extensions.

What disabling right-click costs your visitors

Blocking right-click gets in the way of honest visitors too, because right-click isn’t only for stealing. They use it to open a photo in a new tab, copy a link for a friend or look up where a print is sold.

You can keep the annoyance low:

  • Protect galleries, not the whole site. Lock the client previews and the portfolio, and leave your blog alone.
  • Use Exceptions. In site-wide mode, list your contact page and any page where people need to copy things.
  • Give people a way to ask. Put a license on your photos and a pointer to your contact page in the blocked message.
  • Allow downloads where you want them. For a press kit or a free wallpaper set, add a download button with Modula’s Download Images (Business plan). Here’s how to make a downloadable gallery.

What you need for Image Guardian

Modula’s right-click protection is called Image Guardian, and it comes with Modula Pro on the Trio plan and up. We make Modula, a WordPress gallery plugin, and Image Guardian is one of its image protection features.

You’ll need the free Modula plugin from WordPress.org (160,000+ active installs) plus Modula Pro, with your license activated. The installation guide gets you there in a few minutes.

On the free version? You’ll still find Image Guardian under Protect in the gallery editor, with an upgrade prompt where the switches would be.

Disable right-click on a gallery

Modula sets right-click protection per gallery, so your client previews can be locked down while the rest of your site behaves normally. Start here if your photos live in galleries.

Switch on Image Guardian

Go to Modula → Extensions and turn on Image Guardian. You only do this once per site.

Modula Extensions page, Trio plan group, with the Image Guardian and Password Protect extensions switched on

Stuck? Here’s how to switch on extensions.

Turn on the protection

  1. Go to Modula → Content and open your gallery. Starting fresh? Click New gallery and add your photos with + Add.
  2. Click Protect in the left rail, then Image Guardian.
  3. Turn on Block right-click on images.
  4. Write a Blocked message, the small notice visitors see when they try. Leave it empty and it says “This content is protected.”
  5. Turn on Block dragging images out, so nobody drags a photo to their desktop instead.
Image Guardian in the Protect section of the Modula gallery editor, with Block right-click on images, Block dragging images out and Blur images when leaving the tab switched on

No save button to hunt for: the editor saves as you go.

The block covers the whole gallery, captions and links included, plus the photos and videos in the lightbox, the full-screen view that opens when someone clicks a photo. Self-hosted videos in the lightbox also lose their download button and picture-in-picture. Albums have their own Image Guardian settings, too.

Good to know

Make the message work for you. “This content is protected.” does the job, but “Love this one? Prints and licensing are on my contact page.” turns a blocked click into an inquiry.

Image Guardian in the Modula editor’s Protect section, with Block right-click on images and Block dragging images out on and a custom Blocked message typed in

Add the gallery to a page

Click Embed in the top-right corner of the editor, copy the shortcode and paste it into a page or post. Or use the Modula block.

Already embedded? You’re done: the protection travels with the gallery. Our WordPress gallery shortcode guide covers every embed option.

Test it on your computer

Open the page and right-click a photo. Instead of the menu, you get your notice. Open the lightbox and try again there.

You don’t have to log out for this one. On the live page, a protected gallery blocks everyone, you included. Only the editor’s preview stays clickable. A private window is still the quickest way to see exactly what visitors get.

A Modula gallery after a right-click on a photo, with the dark "This content is protected." notice at the bottom of the screen.

Test it on a phone, too

This is the part most guides skip. On an iPhone, saving a photo isn’t a right-click. It’s a long-press that opens the “Save to Photos” menu, and iOS Safari never fires the contextmenu event, the browser’s right-click signal that JavaScript blockers listen for (WebKit bug 213953, filed in July 2020 and still open). So most right-click blockers do nothing there.

Modula has the lightbox covered. When Block right-click on images is on, it adds a CSS rule (-webkit-touch-callout: none) to the photos and videos in the lightbox, which switches off the iPhone’s touch-and-hold menu. Press and hold a photo there, and the save menu shouldn’t appear.

The gallery grid is the gap. Modula 3.0 doesn’t add that rule to the thumbnails, so press and hold one on your iPhone too. If the save menu shows up, add the one-line CSS fix from the code section below. It covers your thumbnails and every other image on the site.

On Android, Chrome treats a long-press like a right-click, so the block should apply. Browsers vary, though, so grab the phone your clients use and try it.

Disable right-click on your whole WordPress site

Modula’s Protect the whole site setting disables right-click on every page of your WordPress site. Use it when your images live in posts and pages, not only in galleries. Think of an illustrator whose entire site is the portfolio.

  1. Go to Modula → Settings → Protection and find Image Guardian.
  2. Turn on Protect the whole site.
  3. Write a Protection notice, or leave it empty for “This content is protected.”
  4. Check the extras. Block dragging images and Block selecting text start on (form fields stay selectable), and Blur the page when leaving the tab starts off.
  5. Under Exceptions, add your contact page and other pages people need to copy from.
  6. Click Save changes.
Image Guardian in Modula's Protection settings with Protect the whole site on, an empty Protection notice, Block dragging images and Block selecting text on, Blur the page when leaving the tab off, and Exceptions.

Good to know

Why can I still right-click? You’re logged in. Site-wide mode skips anyone who can both upload files and edit posts, which means Authors, Editors and Administrators. Contributors, Subscribers and everyone else get the block. Test it in a private window.

Three things to know before you flip it on. First, it blocks the right-click menu everywhere on the page, links included, so visitors can’t right-click “Open link in new tab” either. That’s what Exceptions are for.

Second, it doesn’t hide image addresses or add the iPhone CSS rule. On an iPhone, the photos in your posts and pages can still be long-pressed and saved. Add the CSS line from the code section below to cover them.

Third, it can’t reach inside an iframe, such as an embedded YouTube video or another plugin’s video player. That goes for script-based blockers in general. A January 2026 WordPress.org support reply put it plainly: “right-click–blocking plugins and custom scripts cannot control the contents of an iframe.”

Your galleries keep their own Image Guardian settings either way. The Image Guardian documentation shows what visitors see.

The other Image Guardian options

Modula’s gallery-level Image Guardian has two more switches: Blur images when leaving the tab and Hide the real file address. Turn them on for the galleries that need them, not everywhere.

Blur images when leaving the tab blurs the gallery whenever the page loses focus, say when a visitor flips to another tab or app. It suits proofs and client reviews: the photos are only sharp while your page has the viewer’s attention.

A Modula gallery sharp while the tab is in view and blurred after the visitor switches to another tab

Hide the real file address serves each photo’s main and lightbox images from a signed /modula-image/ address that only works from your own pages and expires after a week. Open that address in a new tab, or paste it elsewhere, and you get an error (a 403 Forbidden). What it doesn’t hide: the gallery’s responsive image list (srcset) still points to the normal /wp-content/uploads/ files, and browsers load those. So the real addresses stay in your page source, and it slows casual copying, nothing more.

It has a cost, and the editor says so: signed images go through PHP, WordPress’s own code, which is slower and skips your CDN (the network that serves files from servers near each visitor). Browsers can’t cache those images either, so returning visitors download them again.

It probably costs you Google Images, too. The check wants proof that the request came from your page, and crawlers don’t normally send that proof. So signed photos likely won’t show up in image search. Leave it off for photos you want found there.

Local test of Hide the real file address: the signed /modula-image/ address returns 200 from the gallery page and 403 when pasted or linked elsewhere, while the srcset file in uploads still opens anywhere.

Other ways: a free plugin or a bit of code

Free WordPress.org plugins and a few lines of code can also disable right-click in WordPress, no Modula needed. If your images sit in posts and you don’t use galleries, a free plugin may be all you need:

PluginActive installsRatingLast updatedWhat it blocks
WP Content Copy Protection & No Right Click100,000+4.8/5 (1,137 ratings)Oct 21, 2026Text and images; Pro version available
No Right Click Images20,000+4.7/5 (52 ratings)Aug 16, 2026Images only, so links keep working; can skip logged-in users
Disabled Source, Disabled Right Click and Content Protection10,000+4.9/5 (103 ratings)Oct 24, 2026Right-click, Ctrl+U, F12 and image dragging; some features Pro

Figures from WordPress.org, checked October 2026.

Phones are where these plugins differ most. No Right Click Images is refreshingly honest on its own page: “Smart Phone support is hit or miss.”

The No Right Click Images page on WordPress.org: 'Smart Phone support is hit or miss', 20,000+ active installations and 4.7 out of 5 stars.

So which is right for you? A free plugin is enough for one site with images in posts. Image Guardian earns its place when your photos live in galleries and a lightbox. You get a message per gallery, the iPhone long-press blocked in the lightbox, plus blur and signed addresses.

With a few lines of code

Prefer no plugin at all? Add this JavaScript to your site’s footer, through a code snippets plugin that handles JavaScript or through your theme:

document.addEventListener( 'contextmenu', function ( event ) {
	if ( event.target.tagName === 'IMG' ) {
		event.preventDefault();
	}
} );

Then add one line to your site’s Additional CSS:

img { -webkit-touch-callout: none; }

The JavaScript handles desktop browsers, and usually Android, where a long-press fires the same event. The CSS line is the one iPhones listen to: it switches off the touch-and-hold menu (MDN). It’s a non-standard, Apple-only property, but on an iPhone that’s exactly where you need it.

Know the limits before you rely on it:

  • It only sees the image itself. Many galleries and lightboxes put a link or a layer over the photo, and the snippet misses those clicks.
  • It doesn’t stop dragging. Visitors can still drag a photo out.
  • It needs JavaScript. Turn JavaScript off and the menu comes back.
  • It blocks you too. There’s no exemption for logged-in users.

What right-click protection can’t do

Right-click protection stops casual copying, not a determined person. Anyone who really wants your photo can still:

  • take a screenshot, or photograph the screen with a phone;
  • hold Shift while right-clicking in Firefox, which shows the menu without the page ever being told (MDN, updated July 2026);
  • open the browser’s developer tools and find the file;
  • turn JavaScript off, which switches off most right-click blockers;
  • install one of the “enable right click” browser extensions.

So pair it with layers that survive a copy:

  • A watermark puts your name on every copy, screenshots included. In Modula, Watermark comes with the Business plan. See how to watermark photos and the watermark docs.
  • A password keeps private galleries away from strangers (Trio and up). Here’s how to password-protect a gallery.
  • A license tells people what they may do with a photo. Image Licensing (Trio and up) adds one to a gallery’s photos, also as structured data search engines can read. It doesn’t sell licenses. See our guide to image licensing.
  • A reverse image search finds the copies that got away. Run your best shots through Google Lens or TinEye every few months.

For the whole plan, read how to protect images on your website from theft.

Frequently asked questions

No. No website can stop a screenshot, or someone photographing the screen with a phone. Right-click blocking removes the quickest way to save a photo, and a watermark keeps your name on the copies people make anyway.

It depends on the mode. A protected Modula gallery blocks everyone on the live page, you included; only the editor’s preview stays clickable. Site-wide mode skips Authors, Editors and Administrators while they’re logged in. Log out, or use a private window, to see what visitors get.

Partly. On an iPhone, Image Guardian switches off the long-press save menu in the lightbox. It doesn’t add that rule to gallery thumbnails or in site-wide mode, so add the CSS line from the code section for those. On Android, the block should apply in Chrome, but test on your own phone.

Yes. A few lines of JavaScript block the right-click menu on images, and one CSS line (-webkit-touch-callout: none) covers iPhones. The code section above has both, plus their limits: they miss overlays, don’t stop dragging and block you too.

In Modula, switch off Block right-click on images in the gallery, or Protect the whole site in Modula → Settings → Protection. Inherited a site that blocks it some other way? Deactivate protection plugins one at a time, then check your theme’s functions.php and your gallery plugin’s settings.

Either you’re on the free version, which shows an upgrade prompt, or Image Guardian isn’t switched on yet in Modula → Extensions. The switches need Modula Pro on the Trio plan or higher. Video galleries don’t have Image Guardian at all.

Use both if you can. If you can only pick one, pick the watermark: it travels with the image, screenshots included, while right-click blocking only works on your own site. In Modula, Watermark comes with the Business plan and Image Guardian with Trio and up.

No. The block runs in your visitor’s browser, and Google reads your pages and images as before. The one exception is Hide the real file address: photos served from its signed addresses probably won’t appear in Google Images, so leave it off for photos you want found there.

Make your next gallery
the one people remember.