While disabling right-click isn't a true security measure (determined users can always bypass it), it does discourage casual image downloading. Add a small script to your site's code injection.
This approach uses the contextmenu event listener to prevent the default right-click behavior. Note that this affects all right-click functionality including text selection menus, so use it sparingly.
<script>
document.addEventListener('contextmenu', function(e) {
e.preventDefault();
});
</script>
/* Optional: also prevent drag on images */
img {
-webkit-user-drag: none;
user-select: none;
pointer-events: none;
}Find more snippets in our Code Snippets libraryTry it free →
