I want to build a website that will contain a lot of images. I don't want users who visit the website to be able to save the images.
I have blocked the right click option, but is there any other way to keep users from saving the images?
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.Sign up to join this community
A common solution to this sort of problem is watermarking images. Stock photo sites which require membership or payment in order to download photos show sample photos with watermarks. In order to see the larger photo, you must already have access. You'll notice that you will never be able to see the large photo without the watermark without access because of this simple fact that once a user is seeing the photo, it is already on their hard drive and hence can be used (or misused) however they wish. At least a watermark guarantees they cannot have the untampered version.
Short of this, preventing right-clicking will stop a reasonable percentage of users, but it is no security measure, hence nothing can be done.
See Wikipedia's Analog Hole to confirm this implausibility. Best quote to summarize:
It is simply not possible to simultaneously display and conceal a signal.
(Especially when you have zero chance of controlling the hardware people will use to view this content)
However, in the chance that this is an XY problem, you can often provide tiny imperceptible watermarks in images that don't affect their visual quality. If the images appear in a newspaper later, uncredited, you can likely take the newspaper to court and point to your website's faded URL in the corner.
It may be worth clarifying if you just think that the right-click menu is an annoying part of your user experience (ie, right-clicking has a clear and logical effect on the UI, and the menu annoys users trying to do so). Even then, I think that many UI designers would disagree with you. I've been to well over 1,000 websites; even the ones overriding the right-click menu simply brought up a different one.