Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make images in my webpages not downloadable

I am wondering how to prevent people from Save image as.. by right-click images on my webpages.

I was thinking about disable right-click, but it seems I have to write javascript code. Is there a easy way to do this?

like image 471
Jensen Avatar asked Dec 27 '11 21:12

Jensen


1 Answers

The simple answer is "you cannot do that". You might be able to put something on the server side that will check the referer before serving the image, but even that is not 100% guaranteed. Moreover, even if you did manage somehow to prevent this, nothing would prevent somebody from taking a screenshot of the browser page and then cropping the image out of it.

I think a much better approach would be to have a server-side url rewriting and processing of the images to add some sort of a visible watermark identifying the images as owned by you and saving a proper copyright information in the EXIF information.

like image 189
Aleks G Avatar answered Sep 18 '22 16:09

Aleks G