0

I have created a form in django project which contains an image field and i did the image upload and retrieving the image to webpage successfully but one more thing i have to do is to make the image non downloadable. I did that by making the image as background image of a div element using css. But still the image can be downloadable by viewing the page source and using the url of the image. Is there any other way to make the image non downloadable?

Ram
  • 1
  • 1
  • I think your are looking for this: http://racingtadpole.com/blog/private-media-with-django/ – dani herrera Apr 04 '14 at 07:51
  • possible duplicate of [How to prevent downloading images and video files from my website?](http://stackoverflow.com/questions/1294501/how-to-prevent-downloading-images-and-video-files-from-my-website). The fact that you're using Django makes no difference whatsoever since HTML is the determinant technology here. – Louis Apr 04 '14 at 12:05
  • @Ram In a comment on an answer below you ask about flicker. See [this question](https://stackoverflow.com/questions/2129404/how-does-flickr-prevent-people-from-downloading-images-from-the-site). In brief, flicker does not actually **prevent** downloading but merely makes it a bit harder. – Louis Apr 04 '14 at 12:08

2 Answers2

0

If you want to server an image to the browser is impossible for the image to not be downloadable? How would the browser interpret the contents if it cannot access them?

If you want the image to not be usable maybe add a watermark to it.

Lets say you could do that. Display the image but won't be downloadable. But in that case the user could just make a print screen and cut the image out of it.

Bogdan Iulian Bursuc
  • 2,215
  • 1
  • 16
  • 19
  • Do u get an option for saving an image in flickr? we wont get 'save image as' link too when we right click the image too. is there a way to do like that in Django ? – Ram Apr 04 '14 at 07:40
0

You can't do that, the browser implicitly is downloading the image to show it, if you make an image not downloadable, it means that it is not accessible so it won't be displayed. If you want to make it difficult for the user to save it, you can disable the right click in the image so the user can't do something like inspect element in chrome having to look for the image in the source code. As I've said, this is not the solution because there isn't.

argaen
  • 4,145
  • 24
  • 28