-3

I want to stop copying images from my website. Is there any solution?. I don't want to use watermark. I don't want to disable right click. Please...

This is my code.

<div style="width:148px;height:198px;border:0px solid red;background-image: url(<?php echo $MyPhoto[$NP];?>);background-size:100% 100%;background-repeat: no-repeat;"></div>
2
  • Please make a better effort to format your code. Follow proper style guides and make sure your indentations are correct. Certainly don't put all of your code on one line. Also, please be more specific. You want users to not be able to download an image on your site? Or do you want to stop users from being able to use the clipboard?
    – Matt C
    Mar 9, 2016 at 17:16
  • I don't understand your question because I don't know what is the big different between download image and copying to clip board. So, anyway I want to stop them to take my image from my website. – yaseen ahmed 6 mins ago Mar 9, 2016 at 17:31

5 Answers 5

6

Once the user sees the image from your website, its already on his computer in the browser directory where it saves its resources.

The best solution is to use low resolution images or use watermarks since you can never stop image download process even if you disabled right click, dev tools can be used.

3
  • why you removed this code. It won't work well? img{ -webkit-user-select: none; /* Chrome all / Safari all / -moz-user-select: none; / Firefox all / -ms-user-select: none; / IE 10+ / user-select: none; / Likely future */ Mar 9, 2016 at 17:28
  • This poster did not remove code, that was another member. The code that had been posted does not work. Mar 9, 2016 at 17:35
  • @yaseenahmed I haven't removed a thing, and besides, user-select property is used to make text unselectable, it has no impact on images what so ever, so if you had this as an answer its totally wrong
    – KAD
    Mar 9, 2016 at 17:37
3

If it is on the Internet it can be copied. If you do not want your images copied then do not place them on the Internet.

3
  • my website is matrimonial service. so, image is must Mar 9, 2016 at 17:07
  • 1
    Then they can be copied. Simple as that. Mar 9, 2016 at 17:09
  • 1
    Simple enough Sam @JayBlanchard Mar 9, 2016 at 17:18
0

I have used PanoJS to do this. It's a tool that take all tiles of your picture and use the viewer to "assamble" the picture using tiles. The browser always receive all tiles, and if the final user want to reuse all the tiles it could, but it requires and extra effort to do that. You need to make an extra process to your picture, but the provides many script (Perl and python to do this).

When you publish a picture via web, you always are serving the file and it could be copied.

-1

Now this will not be able to completely prevent the copying of digital files, but may help in reducing the likeliness.

.unselectable {
  -webkit-user-select: none;  /* Chrome all / Safari all */
  -moz-user-select: none;     /* Firefox all */
  -ms-user-select: none;      /* IE 10+ */
  user-select: none;          /* Likely future */       
} 

The code above is the CSS addition which can prevent the selection of specific objects, and can reduce the right click save function.

Again this is not a complete prevention just a deterrent. I found this when I was learning HTML now if someone accesses the developer function they can still grab the images/content.

There may be more webkits that can fix your issue but it would take a bit more research.

-2

The only known fixes that can be implemented are by these ways, for more details please write to me directly will tell you the code its no use giving it out in public if you want to have it safe and unbreakable.

  • Direct path - Create a PHP script to "hide" the direct path.
  • Drag and drop - Placing a 1x1 transparent GIF on top of the image.
  • Hotlinking - using .htaccess, to prevent hotlinking
  • Screenshot - not much you can do here. add a watermark to your image

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.