Protecting images
Moderator: General Moderators
Protecting images
Anyone know the best way to protect images? I have some copy protected images I want to display but do not want anyone to be able to get them.
You have probably also seen the "showimage.php?id=3" url's where id stands for a certain image somewhere. But the image is displayed as just an image in the end result, so...oldtimer wrote:That is my fear. Trying to figure out how to get small images of Celebs up without people getting them and distributing them. Got a friend who is a professional photogropher who has thousands of pics.
Was hoping that I could do an include of an image but then source shows it as well :(
As Bech100 said about watermarks, a visible watermark in for example a grey shade of text "SAMPLE" pressed across the entire image, makes it unwanted. If you on the other hand sell the image, the "SAMPLE" text id of course removed =).
There are functions in PHP for adding text to images (or even images to images), so perhaps scouting around for such snippets of code might help.
I'm having the same sort of problem...but a bit different. My images are saved as .jpg files in a linux directory. I only allow users to view the images if they're registered users (i.e. I add an "image" link to the nav bar if the user is authenticated). I know I can change permissions on the image directory, but I'm wondering if there's a purely PHP/MySQL approach to doing this.
So, my question is: Is there a way to control image access (or any file, for that matter), vie PHP and MySQL, without having to omit world permissions in linux.
Is encrypting a blob or longblob data type image (i.e. vie AES_ENCRYPT) more secure than simply adjusting the linux permissions where images reside when they're not in the db?
Just wondering what everyone thinks, and what you guys have done in this situation.
So, my question is: Is there a way to control image access (or any file, for that matter), vie PHP and MySQL, without having to omit world permissions in linux.
Is encrypting a blob or longblob data type image (i.e. vie AES_ENCRYPT) more secure than simply adjusting the linux permissions where images reside when they're not in the db?
Just wondering what everyone thinks, and what you guys have done in this situation.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
I think the important thing to note is that the only way to truely protect the images is to not put them on a website in the first place.
Mac
- Watermarks can be removed.
- Javascript protection is easily disabled.
- Print Screen is available.
Mac
