How to disable right click context menu on images in wordpressInternet becomes way easier to find whatever information’s like texts, images, media files etc. Content and images originates mainly from one place and that will be reproduced, modified and reused on other sites. For content scrapers it doesn’t matter that you own copyright for your images and content, they still make a copy and publish it elsewhere. You cannot completely protect your work from folks who plagiarize content and images. But by taking several measures you can prevent such activities. Are you are very much bothered about people stealing your copyrighted images? Here we will see how to disable right click context menu on images in wordpress.

Also Read: How to prevent image hotlinking in wordpress

Disable right click context menu on wordpress imagesThere are many possible ways to copy images from your website, but the easiest and most used way is from context menu. By disabling right click on images you can greatly protect your images. The other method people try is by dragging and dropping the images from your wordpress site to desktop. Here we will see disabling both the features.

How to disable right click context menu on wordpress images

Install and activate no right click images plugin. After activation you will see an option “no right click images” under settings tab. To disable right click context menu on wordpress images this plugin uses JavaScript in the footer of every page. It disables right click functionality only on images and not on other normal links. It comes with four options.

How to disable right click context menu on images in wordpress

Replace image on right mouse click – You can set a custom default image to appear when someone right clicks on your images.

Prevent drag and drop – You can stop people from dragging and dropping images straight to their desktop.

Allow for logged on users – You can enable right click functionality on images for logged in users.

Stop saving on smart phone – You can stop images from saving on smart phones.

Anyhow the above plugin lacks one feature that is disabling right click on specific images which we will try it manually.

Disabling right click on specific wordpress images

No right click images plugins disables right click option to all your wordpress images. What if you wish to disable right click on any single image or specific images in your posts or pages. Here is a manual try.

Usually you add images to your wordpress post from visual editor, but the actual image tag that you see in HTML editor looks something like this.

<img title=”Add no right click to wordpress images” alt=”Disabling right click on wordpress images” src=”http://blogtimenow.com/images/disable-right-click-wordpress-images4.jpg” width=”125″ height=”125″ />

What we are going to do in remove the image tag <img> and add division <div> tag in HTML editor just like this.

<div style=”width: 432px; height: 270px; background: url(‘http://blogtimenow.com/images/disable-right-click-wordpress-images4.jpg‘) no-repeat;”></div>

Now the image looks like this, which doesn’t disables right click function, but when right clicking on image there will be no such options like “save image as“, “open image in new tab“, “copy image” and “copy image URL“. Also the image can’t be dragged.

You can change width and height, but you cannot add title and alt attributes that you normally do for image SEO.

Hope this post helped you on how to disable right click context menu on images in wordpress. Now you are greatly protecting your wordpress images from copying, who are less technical. Share it and drop your comments below.

email
The following two tabs change content below.
Hi, I spend most of my time working here in Blog Time Now, a blog solely focused on giving cool stuff about Wordpress, SEO, money making, Internet tricks and Technology. You can find me on Google+. Follow Blog Time Now on Facebook and Twitter