Skip to content Skip to sidebar Skip to footer

Disable Downloading Of Image From A Html Page

Suppose there is a html page containing some images. we want to disable the downloading of the images from user side. Is that possible? Should I need to use any javascript or add s

Solution 1:

No, it cannot be done. Explanation here: https://graphicdesign.stackexchange.com/a/39464/24086

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 , 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.

Solution 2:

Depends what you mean by downloading, really.

The user has to be able to download the image (i.e. retrieve the image onto their computer) in order to display the image in their browser. I suspect what you mean is that you want to stop them saving that specific image onto their computer. Any attempt to try and stop them doing this is pretty pointless, as they can always take a screenshot, or just access the image directly using the URL.

I've seen various attempts using javascript to try and stop users from saving images, but they are all easily worked around.

Solution 3:

Cut up the image server-side and store them that way, then assemble them as one image in javascript client-side. The user could download each segment via URL and assemble them manually, but that is much more work than most users are willing to do.

Post a Comment for "Disable Downloading Of Image From A Html Page"