I want to protect the images on my site from right-click download. I found this cms code:
img {
pointer-events: none;
}
This works really well, the problem is it disables all pointer actions, like hover effects with the mouse. Is there a way to prevent download but still have hover effects?
I reviewed the referenced thread; however, am still unclear as to the exact location required/into which specific CSS resource I must paste the sample CSS code.
From the Sitejet editor, I right-clicked on one of my images.
I selected: “Edit CSS”
I pasted the referenced code at the very top of the displayed CSS (on the 1st line beneath the greyed-out comments, above.
I saved and published the changes then quit the Sitejet editor.
After several hours and numerous page reloads, I see zero changes. I am still able to right-click on the affected (and all other) image(s) on my website.
Hi!
It’s not possible to protect images from being downloaded.
The above CSS code will disable all the pointer events (including to right click) for all images. However, the user will still be able to download them using the “Inspect elements” option or by installing a browser add-on.
If you still want to disable the pointer events for images it is better if you do this only for specific images that you really need. So, … instead of targeting all images you can create a class and apply that class to the image.