How to prevent a user from uploading or saving an image?

Well, I have a webpage where I display several images. But my problem is that I do not want the user to upload or save these images. I can apply a watermark to these images, but this is an alternative. I can also turn off the right click, but what if the user saves the page?

Any alternative solution also make?

Hope this question is clear?

+3
source share
11 answers

If the user can see the image, he is already on his computer. Saving it to a file or copying it to the clipboard is trivial and cannot be disabled in any reliable way.

If you want to maintain control over the image, do not put it on the Internet.
Watermarking is the best you can do.

+28
source

If the user can view the image, you cannot stop it in order to save it, because at that moment you already sent it to a file.

You can implement some pseudo-protective code, such as anti Right-Click, to “block” the save, but in general it just annoys the user of your site, and you can always bypass it.

, , .

+4

, , . . , , , (C).

+3

, ?

, . Windows IE Javascript, , , . . , . , URL-, .

, , : . 800x600 , (?) 80x60 . . .

+3

Apache, URL- URL- htaccess:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

, JavaScript .

+3

, . , , - . , .

+2

-, .gif "" , , , , . HTML , .

(, , , , , , .)

+1

, , .

, , ( ), .

+1

, , , : - (

+1

-, , , - .

0

Try using flash to download the image, use flash to decode your encoded images. And this still cannot stop the user from taking a screen capture.

0
source

Source: https://habr.com/ru/post/1781575/


All Articles