Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Community Talk, Chatter & Stuff The Lounge 
Thread started 08 Nov 2006 (Wednesday) 13:21
Search threadPrev/next
sponsored links (only for non-logged)

For those concerned about picture stealing

 
Man ­ of ­ 1000 ­ Ages
Member
49 posts
Joined Oct 2003
Location: New York, NY
     
Nov 08, 2006 13:21 |  #1

Some time ago, I had a problem with people stealing the pictures I put online and using them on their own web pages without permission. I have to say it annoyed me a great deal. I wasn't sure what to do to fix the problem, so as a temporary solution, I closed off access to my photo gallery online. I didn't want to use watermarks, as I wanted to detract from the photos as little as possible. If you are interested in my ranting and raving about the problem, you can read it on my weblog (external link).

In any event, I finally found a solution that I thought I'd share with all of you, as I'm sure this is a problem you've had to deal with. The goal was simple: prevent people from being able to right-click and save my pictures. I didn't want to use some Javascript solution, as there are ways around them and scripts that change the default behavior of buttons can be annoying. The solution I discovered uses CSS (Cascading Style Sheets) to "hide" the picture. I think some online photo gallery systems use this technique.

The following is a description for the HTML and CSS-inclined. Normally, one would have a picture on a web page with a simple img command:

<img src="myphoto.jpg" width="300" height="200" />.

Instead of this, what one can do is tell the image to be blank and make the background of the picture the image you want. This looks more like:

<img style="background:url(​myphoto.jpg)" src="blank.gif" width="300" height="200" />.

The blank.gif image should be a 1x1 pixel transparent gif file. This way, the image in the background is visible. If someone right clicks and tries to store the picture, though, they will only get blank.gif. The other step you have to take is to have hotlinking disabled on your web server and/or photo gallery. Otherwise, someone could look at the HTML for your page, find the name of the picture, and then type in the address directly.

I've now implemented this method in my online photo gallery by altering the Gallery (external link) code to put photos in the CSS background style. If anyone wants copies of the altered files for their own use, let me know and I can provide them. Note that this method will not prevent someone from using the print screen button to capture a picture. I figure, though, that the print screen option is one only the most determined of web users will use; my goal was to stop the Myspace and Xanga teenagers who didn't respect my rights to my pictures.

In any event, I hope some of you find this helpful for your own online photo galleries! If you have an comments (or find a way to break this technique), I'd love to hear them.


EOS 7D, EF 24-105mm f/4L IS, EF 28mm f/1.8, EF-S 10-22mm f/3.5-4.5, EF 50 f/1.4, EF 70-200mm f/2.8 IS
My Photo Gallery (external link)

  
  LOG IN TO REPLY
superdiver
Cream of the Crop
Avatar
9,862 posts
Likes: 5
Joined Jan 2006
Location: Ketchikan Alaska
     
Nov 08, 2006 13:38 |  #2

I am a computer idiott but what yu have discribes makes alot of sense....but cant someone steel backgrounds as well?


40D, davidalbertsonphotography.com
Newbie still learning

  
  LOG IN TO REPLY
Morgandy
Member
177 posts
Joined Jul 2006
Location: San Jose, California
     
Nov 08, 2006 14:09 |  #3

Man of 1000 Ages wrote in post #2235156 (external link)
The other step you have to take is to have hotlinking disabled on your web server and/or photo gallery. Otherwise, someone could look at the HTML for your page, find the name of the picture, and then type in the address directly.

As far as I know, disabling hotlinking doesn't prevent a browser from displaying a site's HTML. I was going to visit your site to see if I could break your image protection scheme by viewing the HTML, but the site has not been responding for several minutes.




  
  LOG IN TO REPLY
tommykjensen
Cream of the Crop
21,013 posts
Gallery: 6 photos
Likes: 260
Joined Mar 2004
Location: Copenhagen, Denmark.
     
Nov 08, 2006 14:20 |  #4

Have you heard of print screen ?

If the user can see the photo it can be stolen.


EDITING OF MY PHOTOS IS NOT ALLOWED

  
  LOG IN TO REPLY
Man ­ of ­ 1000 ­ Ages
THREAD ­ STARTER
Member
49 posts
Joined Oct 2003
Location: New York, NY
     
Nov 08, 2006 14:20 as a reply to  @ Morgandy's post |  #5

Hmmm...how odd, the page seems to be working for me. It is true that one can view the HTML and see the names of the picture files. However, what disallowing hotlinking prevents is the ability of people to copy the URL of a photo and paste it into the address bar of their web browser to get to the photo itself. Normally, this is how one would steal a background image. This is why disabling hotlinking is vital for the method to work.


EOS 7D, EF 24-105mm f/4L IS, EF 28mm f/1.8, EF-S 10-22mm f/3.5-4.5, EF 50 f/1.4, EF 70-200mm f/2.8 IS
My Photo Gallery (external link)

  
  LOG IN TO REPLY
Man ­ of ­ 1000 ­ Ages
THREAD ­ STARTER
Member
49 posts
Joined Oct 2003
Location: New York, NY
     
Nov 08, 2006 14:22 |  #6

tommykjensen wrote in post #2235357 (external link)
Have you heard of print screen ?

If the user can see the photo it can be stolen.

From my original posting: "Note that this method will not prevent someone from using the print screen button to capture a picture. I figure, though, that the print screen option is one only the most determined of web users will use; my goal was to stop the Myspace and Xanga teenagers who didn't respect my rights to my pictures."


EOS 7D, EF 24-105mm f/4L IS, EF 28mm f/1.8, EF-S 10-22mm f/3.5-4.5, EF 50 f/1.4, EF 70-200mm f/2.8 IS
My Photo Gallery (external link)

  
  LOG IN TO REPLY
tommykjensen
Cream of the Crop
21,013 posts
Gallery: 6 photos
Likes: 260
Joined Mar 2004
Location: Copenhagen, Denmark.
     
Nov 08, 2006 14:23 |  #7

Man of 1000 Ages wrote in post #2235368 (external link)
From my original posting: "Note that this method will not prevent someone from using the print screen button to capture a picture. I figure, though, that the print screen option is one only the most determined of web users will use; my goal was to stop the Myspace and Xanga teenagers who didn't respect my rights to my pictures."


Oops sorry. So it is just hotlinking you are talking about here.


EDITING OF MY PHOTOS IS NOT ALLOWED

  
  LOG IN TO REPLY
tommykjensen
Cream of the Crop
21,013 posts
Gallery: 6 photos
Likes: 260
Joined Mar 2004
Location: Copenhagen, Denmark.
     
Nov 08, 2006 14:25 |  #8

Man of 1000 Ages wrote in post #2235359 (external link)
Hmmm...how odd, the page seems to be working for me. It is true that one can view the HTML and see the names of the picture files. However, what disallowing hotlinking prevents is the ability of people to copy the URL of a photo and paste it into the address bar of their web browser to get to the photo itself. Normally, this is how one would steal a background image. This is why disabling hotlinking is vital for the method to work.

I think he clicked on the link to menalto gallery on not yours. I did the same and menalto did not respond (at least not within my limit of patience)


EDITING OF MY PHOTOS IS NOT ALLOWED

  
  LOG IN TO REPLY
Man ­ of ­ 1000 ­ Ages
THREAD ­ STARTER
Member
49 posts
Joined Oct 2003
Location: New York, NY
     
Nov 08, 2006 14:30 |  #9

tommykjensen wrote in post #2235372 (external link)
Oops sorry. So it is just hotlinking you are talking about here.

Well, it is a little more than hotlinking that is being prevented. People cannot right click on the picture to download it thanks to the CSS. If they do so, all they will get is a transparent 1x1 pixel gif. So basically, it stops everything except the print screen button and looking through one's cache to find the picture. I figure 99% of people aren't going to go through this trouble.


EOS 7D, EF 24-105mm f/4L IS, EF 28mm f/1.8, EF-S 10-22mm f/3.5-4.5, EF 50 f/1.4, EF 70-200mm f/2.8 IS
My Photo Gallery (external link)

  
  LOG IN TO REPLY
CyberPet
Hiding Under a Rock
Avatar
4,052 posts
Likes: 2
Joined May 2005
Location: Piteå, Sweden
     
Nov 08, 2006 16:16 |  #10

you can always get an image from a website if you know your way around html and can see where the images are "hidden", by reading the source code. I don't think there's any safe way unless you use flash or similar... but then you can always hack that too.

Just make the images small enough so they aren't worth stealing.


/Petra Hall
Click here to view my geeky gear list
I shoot as much as possible in available light... sometimes, my flash is available – Joe Buissink

  
  LOG IN TO REPLY
Man ­ of ­ 1000 ­ Ages
THREAD ­ STARTER
Member
49 posts
Joined Oct 2003
Location: New York, NY
     
Nov 08, 2006 16:54 |  #11

CyberPet wrote in post #2235932 (external link)
you can always get an image from a website if you know your way around html and can see where the images are "hidden", by reading the source code.

Actually, that isn't true. A web server can be set up to deny access to image files (or any other kinds of files) based on specific conditions. For instance, you can set up your website to only allow access to your pictures from pages on your website; even if people do have the name and location of the file from the source code, they would get a "forbidden" error if they try to access the picture. This is what a .htaccess file does. I haven't tried out the script, but this page details how to prevent hotlinking with the .htaccess file (external link). This should also cover direct linking, i.e., typing the address of a picture directly into the address bar.


EOS 7D, EF 24-105mm f/4L IS, EF 28mm f/1.8, EF-S 10-22mm f/3.5-4.5, EF 50 f/1.4, EF 70-200mm f/2.8 IS
My Photo Gallery (external link)

  
  LOG IN TO REPLY
BillsBayou
In trouble with my wife
Avatar
5,025 posts
Likes: 8
Joined Mar 2006
Location: New Orleans, La. USA! Favorite Cheese: Caciocavallo Invention: Incendiary Spit-Bomb Wait. What?
     
Nov 08, 2006 17:00 |  #12

It took me three minutes to figure out how to download any image I want from your gallery.

I took the contents of the background url, fixed it into the web site's url, pasted that into an html "img" tag, saved the file to my hard drive, opened it to see your image, and I can right click the image directly from your site. I'm not going to go to the trouble of streamlining the process as I don't want to steal your images. However, I have to say that the process took me a little longer than I usually take because I couldn't just paste the contents of the background url into the web address and let Internet Explorer just show me the image. I actually had to create a text file to download the image.

I do like the trick, however.

Oh, and I found a free program that allows me to download, save, and decompile flash programs into their individual components of code, images, and web addresses. It was a security test I did for someone who swore they had secured their data. Not.


Take only pictures, leave only footprints...
"Cameras don't shoot people. Photographers shoot people." - Me
I must not break rule GN.4, Please help me un-see that photo, I must not break rule GN.4...
Gear List

  
  LOG IN TO REPLY
Billginthekeys
Billy the kid
Avatar
7,359 posts
Likes: 2
Joined Nov 2005
Location: Islamorada, FL
     
Nov 08, 2006 17:05 |  #13

okay folks, you have to figure out that if you arnt willing to use watermarks, or file sizes that are too small to be useful there is NO WAY to stop someone from stealing your pictures. non right click solutions are useless. 1. they dont work on some browsers. 2. on most of the other browsers its very easy to get around, and 3. if worst comes to worst you can hit print screen and crop the image out in photoshop. if you really want your pictures to be secure on the net you have to watermark them, even if it ditracts from the image.

that said most 13 yr old girls wouldnt know that, so since you were concerned with myspace, thats probably not going to be much of a problem anymore.


Mr. the Kid.
Go Canes!
My Gallery (external link)My Gear
what the L. just go for it.

  
  LOG IN TO REPLY
cosworth
I'm comfortable with my masculinity
Avatar
10,939 posts
Likes: 21
Joined Jul 2005
Location: Duncan, BC, Canada
     
Nov 08, 2006 17:19 |  #14

File > Save As> Done.

A cure for the common cold hasn't been found. But if you embed you image in a flash file it takes a pretty savvy person to bust apart a swf file.


people will always try to stop you doing the right thing if it is unconventional
Full frame and some primes.

  
  LOG IN TO REPLY
Man ­ of ­ 1000 ­ Ages
THREAD ­ STARTER
Member
49 posts
Joined Oct 2003
Location: New York, NY
     
Nov 08, 2006 17:58 |  #15

Billginthekeys wrote in post #2236141 (external link)
non right click solutions are useless. 1. they dont work on some browsers. 2. on most of the other browsers its very easy to get around, and

True of Javascript-based solutions, but not CSS-based solutions. Older web browsers that do not support CSS simply will not display the picture period. You'd have to go back to a pretty old version of a browser to find one that doesn't support the necessary CSS, too (Netscape < 6.0 and IE < 4.0).

cosworth wrote in post #2236197 (external link)
File > Save As> Done.

This only works if you can type the name and location of the file in directly to the address bar, which can be prevented, as described in the link I give above.


EOS 7D, EF 24-105mm f/4L IS, EF 28mm f/1.8, EF-S 10-22mm f/3.5-4.5, EF 50 f/1.4, EF 70-200mm f/2.8 IS
My Photo Gallery (external link)

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

2,734 views & 0 likes for this thread, 11 members have posted to it.
For those concerned about picture stealing
FORUMS Community Talk, Chatter & Stuff The Lounge 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is Frankie Frankenberry
1096 guests, 119 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.