Reply
Prevent images from being pulled off your site?
Old 11-01-2009, 05:28 PM Prevent images from being pulled off your site?
World's Avatar
Extreme Talker

Posts: 165
Location: Santa Monica, CA
Trades: 0
Even though my images are now displayed by Javascript, you can still pull them easily on your desktop.

This website of a photographer in Chicago (I'm in Los Angeles) also uses Javascript, but his images are protected from being pulled off the page.

You can't even highlight and copy text.

How do you do that? I suppose it has something to do with Javascript.

As I'm a photographer who wants to protect his work as good as possible (it's registered with the library of congress, but, anyway) I'd be grateful if you could tell me how to do this.
World is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-01-2009, 05:52 PM Re: Prevent images from being pulled off your site?
chrishirst's Avatar
Super Moderator

Posts: 22,222
Location: Blackpool. UK
Trades: 0
place an absolutely positioned element over the top of the images with a 1x1 px (stretched) transparent gif in it.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-01-2009, 05:57 PM Re: Prevent images from being pulled off your site?
World's Avatar
Extreme Talker

Posts: 165
Location: Santa Monica, CA
Trades: 0
Thank you, Chris!

Just that I don't misunderstand: I do this in CSS, not in Javascript.

I use a tiny, tiny gif of the size 1 by 1 pixel. I set it to transparent.

I use absolute positioning and use a high z-index to make sure it's on top (or place the image above the div for the photo in my HTML.

Additional question: as my images are not all of the same size - is it enough to place it "somewhere in the center"?

Last edited by World; 11-01-2009 at 05:59 PM..
World is offline
Reply With Quote
View Public Profile
 
Old 11-01-2009, 07:58 PM Re: Prevent images from being pulled off your site?
chrishirst's Avatar
Super Moderator

Posts: 22,222
Location: Blackpool. UK
Trades: 0
It needs to match the size of the image container. Ideally you should be setting sizes on your images anyway.
On the rare occasions I've needed to I set the real image as background to an element then overlay the transparent gif sized to fill the container.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-01-2009, 08:08 PM Re: Prevent images from being pulled off your site?
World's Avatar
Extreme Talker

Posts: 165
Location: Santa Monica, CA
Trades: 0
With "its container", do you mean the div? Or does this transparent gif have to match the image it covers?

I'm a bit confused by this 1x1 px size. I thought it was just a token transparent gif.
World is offline
Reply With Quote
View Public Profile
 
Old 11-01-2009, 08:25 PM Re: Prevent images from being pulled off your site?
chrishirst's Avatar
Super Moderator

Posts: 22,222
Location: Blackpool. UK
Trades: 0
It is a "token size" you just "tell it" to be whatever size you need. doesn't really matter if you "stretch" it to 800x600 it will still be only the same size in bytes.

or you can set as background of the overlayed element.

any thing in JS is easily deteated (obviously the images can be referenced directly from the source code if they are determined, but it stops the casual ones.

If you are still puzzled I'll do a demo later (cos it's the wrong side of midnight here )
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-01-2009, 09:37 PM Re: Prevent images from being pulled off your site?
webcosmo's Avatar
Ultra Talker

Posts: 267
Location: Boston, MA
Trades: 1
I would not really bother with these methods. Anybody with some good knowledge can easily take your image

Still keen to learn? check out this article http://www.naturefocused.com/article...rotection.html
__________________
JOIN US * FAST GROWING WEBMASTER FORUM * JOIN US
Join the fun loving, helpful community of webmasters
Free Classified Ads
webcosmo is offline
Reply With Quote
View Public Profile Visit webcosmo's homepage!
 
Old 11-02-2009, 05:30 PM Re: Prevent images from being pulled off your site?
seannarae's Avatar
Experienced Talker

Posts: 44
Location: san francisco, ca
Trades: 0
Are you seeking to implement a method to prevent the right-click > save-as process?

Because if implemented, you're also preventing anyone from viewing the properties of that image. Which you may be ok with. In my experience, disabling the right-click context menu to prevent save as was more trouble than its worth, from a user experience perspective.

Moreover, you're really not able to prevent the download of your images. If they're online, they're downloadable. If i can view your images in my browser, then simply by way of how browsers work, they've already been downloaded to my local system.
seannarae is offline
Reply With Quote
View Public Profile
 
Old 11-02-2009, 06:43 PM Re: Prevent images from being pulled off your site?
World's Avatar
Extreme Talker

Posts: 165
Location: Santa Monica, CA
Trades: 0
Quote:
Originally Posted by chrishirst View Post
If you are still puzzled I'll do a demo later (cos it's the wrong side of midnight here )
I'd appreciate that.

I'm really a Javascript greenhorn.
World is offline
Reply With Quote
View Public Profile
 
Old 11-02-2009, 06:47 PM Re: Prevent images from being pulled off your site?
World's Avatar
Extreme Talker

Posts: 165
Location: Santa Monica, CA
Trades: 0
Quote:
Originally Posted by webcosmo View Post
I would not really bother with these methods. Anybody with some good knowledge can easily take your image

Still keen to learn? check out this article http://www.naturefocused.com/article...rotection.html
It's protection against casual users.

Against the knowledgeable ones I am sure that I don't post images larger than 700x460, and this at 120ppi. Great for internet viewing, but if you want to print it, you'd get something very, very small.

For my Myspace account that I'm going to open (every photographer needs one), I'm going to put a larger watermark over the image.
World is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Prevent images from being pulled off your site?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13991 seconds with 13 queries