Friday, July 26, 2024

How to Disable Right Click on Blogger Images

We are going to share how to Disable Right Click on Blogger images and the context menu on images. Many people want to protect their images from being stolen or used by others. By using this trick you can protect pictures from being copied.

How to Disable Right Click on Blogger Images

1. Go to the template

2. Edit HTML and find <head>

3. And paste the given code just below <head>

<script type="text/javascript">
//<![CDATA[
function nocontext(e) {
var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
if (clickedTag == "IMG") {
alert(alertMsg);
return false;}}
var alertMsg = "Right click on images has been disabled";
document.oncontextmenu = nocontext;
//]]>
</script>

4. Change the alertMsg text in between quotes with your choice5. Save and Done.

How to Disable right click on a single image

To disable right click on a single image follows these steps.
1. Go to Post editor
2. Switch to HTML mode
3. Find the IMG tag of that image and put this code

oncontextmenu='alert("Image context menu is disabled");return false;'

4. And publish.

Example of img tag and inserted code 

<img oncontextmenu='alert("Image context menu is disabled");return false;' border="0" src="https//www.abhishekindora.com/exampleimage.JPG" />

We hope that it helped you. If you think that the article can help someone then please make share it with them.

Sharing is Caring…

RELATED ARTICLES

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

POPULAR

New Updates

Categories