Advertisement


Is it possible to prevent download of images when designing a website?


Question

Say you wish to provide sample high-quality images in your website but also wish to protect them from download, as in you can view them on screen but can't save from the website.

Is there a way to do this?

Edit: This is not something I need to do but as per one method in the answers I had seen the right click disabled on a website and was interested.

2017/07/16
1
8
7/16/2017 10:41:00 PM

Accepted Answer

For all intents and purposes, this is downright impossible.

  • You can disable right click, but people can still view the source code of your page (by adding view-source: to the URL in Chrome, or just using a browser menu) and find the URL.

  • You can use a CSS background-image instead of HTML <img>, but people can still use their browser's inspector (F12 for most browsers) and find that element's CSS properties.

  • You can engineer some crazy thing that you think will work, but at the end of the day, the user has to download the image in some way to see it. If the user is completely unable to download the image, he/she won't even be able to see it in the first place! No matter what you do, nothing will prevent a simple glance at a network traffic monitor or the "Network" tab of your favorite browser's developer tools.

2014/09/24
21
9/24/2014 11:51:00 AM

Doorknob is right; it's impossible to prevent users from downloading the image. Any safeguard you put in place can be bypassed. Blocking Right Click is easily thwarted by disabling JavaScript (or modifying the script if necessary).

You can, however, employ other methods to protect your assets. Watermarking is one way to guard your copyrighted images. Take a look at any stock photo website to see how they do it:

iStockPhoto example page

iStockPhoto (above) for example gives users the ability to zoom in and view the details of an image. Their watermark scales with the zooming. It's unobtrusive enough to allow people to analyze the image, but prominent enough to mitigate thievery.

2014/09/24