• Post Reply Bookmark Topic Watch Topic
  • New Topic

I want to hide the image location while viewing the source of the page  RSS feed

 
Senthil Manoharan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm doing a web application, in that i'm loading the dynamic image using the jsp command(out.println). I want to hide the location of image when user clicks and view the page source.
can anyone please help with that?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cannot be done. What's the purpose? Maybe another approach can achieve the goal.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only trivial solution I think of quickly is to read the image on the server side and stream it to the client with an image servlet (or equivalent).
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:The only trivial solution I think of quickly is to read the image on the server side and stream it to the client with an image servlet (or equivalent).


But the src of that image stream will still be available via the img tag. After all, it is still just a URL.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which is why we need the reason that this is being done. If it's to prevent the image from being downloaded, forget about it!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does an undownloadable image make a sound if it falls in a forest?
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how to hide the image entirely, but one thing you could do is cut the image up into different sections, and then use css to piece them together like a puzzle. You wind up with 5 seperate images....each a piece of the puzzle to the large image. That way, the freeloaders only get one part of the image. Not fool proof, but it does make it more difficult for them to obtain. They would have to download every piece of the image and then reassemble it with photoshop or something.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a deterrent. Two clicks in a screen grab program and the entire image is available. But again, we haven't heard from the OP on what he is actually trying to accomplish.
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing you can do is surround everything with the <INVISIBLE> </INVISIBLE> tags and also disable right clicking with javascript. And finally, in conjunction with the puzzle solution i mentioned earlier, you could also create transparent gif's the same size as your puzzle pieces, and use css to overlay them precisely on top of each piece of your picture. If they do manage to find a way to right click, say by disabling javascript, then all they get are transparent gif's. Again, none of this is fool proof, but you wind up making someone work really hard grabbing your code and images.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All of these tricks are useless, make the pages a complete mess, and don't do a thing to make it at all hard for anyone to copy an image. If the image is visible on the screen, it can be copied with two clicks.

The only way to "secure" an image is not put it on the Internet.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:The only way to "secure" an image is not put it on the Internet.


+1
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:All of these tricks are useless, make the pages a complete mess, and don't do a thing to make it at all hard for anyone to copy an image. If the image is visible on the screen, it can be copied with two clicks.

The only way to "secure" an image is not put it on the Internet.


Yeah, that's true, if someone is using a screen reader you're pretty much hosed. Even the invisible tag is useless against FireBug. It does slow some people down though. But tech savvy surfers will get it without much problem. Heck, they can probably just go to their browser cache and find it. Bear's right, you're pretty much out of luck. But if someones breathing down your neck to take some measures you can try what I mentioned above. I was merely trying to be helpful. Or maybe you should just have Bear here slap your manager and tell them what a waste of time it is. He seems pretty surly to me. I bet he'd do it.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And all this is still moot if the OP doesn't chime in and tell us the purpose behind the question.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But it's fun!

And disabling right-click via JavaScript doesn't work if JavaScript is disabled anyway.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ooooh, how about watermarking your images so even if they get them there is a big COPYRIGHT word slashing through the middle of it. That makes looking at the images even more fun.
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg Bolinger wrote:Ooooh, how about watermarking your images so even if they get them there is a big COPYRIGHT word slashing through the middle of it. That makes looking at the images even more fun.


I know, I know! You can use crappy quality images so you don't have to worry about them being copied! That worked so well for bands after all. You know, the ones that would have a web page and put crappy quality audio of their originals on the internet. Really made people wanna rush right out and buy their music!



Hey, this is fun.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:And disabling right-click via JavaScript doesn't work if JavaScript is disabled anyway.

And makes your site a laughing stock.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, yeah, like a blocky pixelated image: "Register for full image quality."
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
David Newton wrote:And disabling right-click via JavaScript doesn't work if JavaScript is disabled anyway.

And makes your site a laughing stock.


Like UT's homepage.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm still waiting for the OP to clarify his question.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kevin Eddy wrote:Like UT's homepage.

Utah?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Universal Transconductors
 
Senthil Manoharan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for your replies
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem.

Still wish you'd clarify your question, though.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!