bethlakshmi / abc-inventory

ABC inventory
3 stars 0 forks source link

protect images on ABC from download #13

Open bethlakshmi opened 3 years ago

bethlakshmi commented 3 years ago

OK, did some research...

https://graphpaperpress.com/blog/protect-website-image-stealing/

Was useful.

Easy stuff:

All of this is easy, in part, because it doesn't matter how the image is stored on the server, it only matters what I do when I build the page. Hooray.

Harder

Even Harder?

HOWEVER

All of that is predicated on the idea that the image file storage is not an open door regardless. We should also consider:

https://django-filer.readthedocs.io/en/latest/secure_downloads.html#secure-downloads

This is the system I set up for the basic data storage of files back when I set up our data. It looks reasonable, and regardless of the "experimental" stuck all over it, I think the stuff we'd use is pretty simple and unlikely to be a big pain in the ass. We'd do the option of "lock it all down to logged in users" or something similar.


Soo.....

I haven't seen anything that makes me say "OMG! If we want to protect our images we need a whole new image storage system". Which would lead to me stopping the other image tickets and throwing myself at that.

Scratch - I would say that if you wanted the automated watermarking option. If you wanted to go that route, I'd put the other work on pause and research that to see what the best route is. Fair warning - it could be easier than it looks, it could be "eesh, you don't pay me enough". Image management and protection is definitely not my field of expertise.

On all the other options, "easy", "hard" and "However" - it's really just a ticket and some work. The hard part is figuring out what protections we deem reasonable... which would be easiest in person.

burlexpo commented 3 years ago

A lot of the sites that I license images from actually have two or three images. One they display which has their watermark all over it; one you can download (after paying) that doesn't. Sometimes there's a thumbnail that doesn't have a watermark. Can we do something like that?

Example: you go to Getty Images and search for "Lili St. Cyr". You get these results: https://www.gettyimages.com/photos/lili-st.-cyr?family=editorial&phrase=lili%20st.%20cyr&sort=mostpopular#license No wartermark

You click on the first image and you get here -- https://www.gettyimages.com/detail/news-photo/actress-and-stripper-lili-st-cyr-poses-for-a-publicty-photo-news-photo/461456676?adppopup=true which has info about how to download it and a watermarked version of the image. If you click on that image, you get a bigger image, but still with the watermark.

Removing the right-click menu is good. Casual theft is part of the problem.

Put a copyright on the footer - I make you a place for a footer, you use it with Django CMS for the copyright You mean on the footer of the website? People will totally ignore that. I mean, it's nice to do, but it won't deter theft.

Don't present high quality to non-logged-in users - and then audit/track high quality downloads? Certainly let's not make it easy to download high-quality images without jumping through some hoops. It doesn't really matter how good the quality of the displayed image is if the only way for someone to steal it is screen capture, since screengrabs aren't high quality images.

stick up the free DCMA badge somewhere - it's like a digital "Beware of Dog" sign. Yeah, let's do that anyway. Again, like a copyright notice it won't do much, but at least if we go after someone they won't be able to say "I don't know".

stick it as the background of a div. Cheesy but easy. It means some more work for me since it means for any option that we want to let the user expand the image, it has to be in this style Up to you. If that's the best version, that's the best version.

bethlakshmi commented 3 years ago

OK. Once done with the current ticket, I'll get into this... Sounds like:

I'll definitely do...

I'll skip

And - based on your example, I think I can use this to do what you are showing with your URL examples. In our case, I'd do this:

My one reservation on this code, is that it's been there for 3 years and no updates. And the other alternate library that came up fast was also similarly old and untouched. In the last 3 years, Python deprecated 2.X and Django has moved seriously forward. So I'm a wee bit worried about compatibility. Given that they are based on a core library that is actively maintained, this is worth a try. If I find myself deep in a rabbit hole, however, I will make thumbnails a separate ticket.

@burlexpo: QUESTION: Do you want to NOT have a watermark if you are admin? also, I could give you the general user experience (with watermark) and then have a button or something that only admins can have that lets you remove the watermark easily when it's in your way? That's a pretty simple thing. TODO: before installation, I'll need the image you want to use as a watermark. The tool will let me control opacity, and grey out color, and several other settings, so mostly I need the basic image. This gets put in the Admin pages, so it can always be changed.