Jump to content

Protecting your images


Recommended Posts

Does anyone have a piece of code or module to install that will protect images from being copied?

 

Basically I would like to prevent people from right clicking and copying product images or from dragging them to desktop to copy.

 

I'm trying to install the watermark module but would like some code as an extra protection.

Link to comment
Share on other sites

Hello, in website, it's really difficult to protect images.

You can use javascript to stop right click, but if you really want the picture you can block java.

Replace in header.tpl in your template

<body {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}>

by

<body onselectstart="return false" oncontextmenu="return false" ondragstart="return false" onMouseOver="window.status='..message perso .. '; return true;" {if isset($page_name)}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}>

You can stop 70% visitors only...

Link to comment
Share on other sites

Thanks for this. I appreciate that if someone knows their stuff they can get the images. But my client wants some protection in the form of a watermark and some code. I'll try the code you suggest and I'll let you know how I get on...

Link to comment
Share on other sites

  • 4 years later...

good code, work also for 1.6.X

just ad just

onselectstart="return false" oncontextmenu="return false" ondragstart="return false" onMouseOver="window.status='..message perso .. '; return true;"

to body tag.

 

thank for sharing

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...