Block right-click in WordPress galleries to discourage casual copying and add another image protection layer.
This is not an effective way to protect your photos
Note: Right-click protection is not an effective way to fully protect your photos. It may deter casual users but can be circumvented by more tech-savvy individuals. Consider it as a deterrent rather than a foolproof solution.
What the right-click switch blocks
Right Click Protection is a single switch under Block settings, Protection. Turn it on and the context menu stops opening over gallery images and over any link that points to an image file, in the grid and in the open lightbox. Dragging a photo out of the page stops working. Alt-click, Shift-click and Cmd-click on those links are blocked too, which kills the browser shortcuts for saving a linked file.
The editor panel warns that this is not an effective way to protect photos, and the warning is accurate. Screenshots still work. So do developer tools, and the image address typed into the address bar still returns the file. The switch earns its place anyway, because the visitor who lifts a photo off a portfolio is usually not trying very hard. When the copied file has to be worth less to whoever took it, the alternative is a watermark, which serves a stamped copy instead of the original.
The rest of the Protection panel
All four settings in the Protection panel are off until you switch them on, and any combination of them can be on at once. The panel disappears when the content source is Social, so an imported feed cannot use any of it.
- Right Click Protection covers the gallery items and the lightbox those items open. Images elsewhere on the page keep their context menu.
- Add Watermarks to Photos moves the gallery, its srcset, the lightbox image and the URL click-action link onto the watermarked copy. The copies are generated first in Settings, Watermarks.
- Password Protection swaps the gallery for a password form. A correct password sets a cookie for 30 days, so that device is not asked again.
- Age Gate Protection checks a birthday against an Age Gate Limit of 18, which accepts 1 to 100. Crawlers whose user agent contains bot, crawl, slurp or spider skip the gate. They do not skip the password.
- Watermarked copies live under wp-content/uploads/visual-portfolio-pro/watermarks/ with hashed file names, so the copy’s URL cannot be guessed from the original’s.
- The Saved Layouts editor carries the same panel, so the gallery stays protected when Elementor, WPBakery or the Classic Editor place it.
Switching it on in three steps
- Insert the Visual Portfolio block, set Content Source to Media, and add your images. Media is a free source, so nothing up to this point needs a license.
- Open Block settings, Protection, and switch on Right Click Protection. Add Watermarks to Photos sits at the top of the same panel, in case you want the stronger measure while it is open.
- Set Click Action to Popup so the lightbox falls under the same switch. Then open Settings, Popup & Lightbox and leave Display Download Button off, because turning it on hands the full file to every visitor.
The Protection panel is the paid part
Pro contains the free plugin, so this is one plugin to install rather than two, and galleries you already built keep their settings when you move across. A free copy at version 3.8.1 or newer can stay active beside it. The full split sits on free vs Pro, and the license tiers are on pricing.
- The free plugin builds the gallery itself: Tiles, Masonry, Grid, Justified and Carousel layouts, the lightbox, AJAX filter, sort and pagination.
- A license adds the Protection panel, which is the right-click switch, watermarks, the password form and the age gate, in the block and in the Saved Layouts editor alike.
- Proofing galleries, custom click actions, deep linking and the custom lightbox image are Pro as well.
Questions about blocking right-click
Does this stop image theft?
No, and better to hear it here than after paying. The switch handles the visitor who saves a photo because saving was easy. It does nothing about anyone willing to open developer tools or press the screenshot key. The support answer on right-click protection and image theft points at watermarks as the measure that changes what a thief walks away with.
Do watermarks change my original files?
No. Stamped copies are generated alongside your uploads, and only a gallery with Add Watermarks to Photos on serves them. Switch that off and the gallery is back on the originals immediately. One image can lose its watermark from the Media Library, and the feature comes off the whole site in Settings, Watermarks.
Can a visitor still download from the lightbox?
Only if you handed them the button. Display Download Button is off by default, and turning it on puts a download control in the lightbox toolbar for everyone who opens a slide. The right-click switch does not reach that toolbar. Check the setting in Popup & Lightbox before you assume the lightbox is closed.