Right click disable (saving images)

Hi,

I have tried using PixelGeeks code snippet to disable the right click > Save as functions on my images on my site but it doesn’t seem to be working anymore.

Has something changed that would stop it?

script>
$(‘img’).bind(‘contextmenu’, function(e) {
return false;
});
</script

Obviously I’ve removed the pieces to allow it to show


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

I don’t have an answer for you, but I am looking for a solution as well. I too tried the code and it didn’t work for me either.

Hey, @TBD @IPT Have you tried :arrow_down: CSS as it makes element non-interactive to any mouse events.

img { pointer-events: none; }

But if you want to apply any interaction to an image element then the above method is not of any use!

I know this is an old thread but I have the solution, add this to the custom footer code:

<script>
$('body').on('contextmenu', 'img', function(e){     return false; }); 
</script>