How to disable image save button

How to disable image save button
0

#1

hi, how can i disable image save on my searchbox button, and not only my searchbox i have alot of button have same issue.

<button>
<img src="https://i.imgur.com/BX74tjG.png" width="18.1" height="18.1" >
</button> 

#2

The only way I can think of is to instead of using img HTML element to render an image, you can display image using CSS property
background-image: url("./image.png");.

Edit: I made a simple example:
https://codepen.io/michal9909/pen/XegEmZ

Although I don’t see why you want to remove it.


#3

Did you try this?


#4

wow thank you so much it worked :slight_smile:
finally got my answer!


#5

You can use the pointer-events property on the image and set its value to none. This will tell the browser to ignore any mouse events, including mouseover (hover) and click (no matter what type of click).

Here’s a working demo

and here is a wonderful article about the pointer-events property from the CoDrops CSS Reference.