One fine day, you come across a website using a lot of images from your website, how do you feel. I understand that feeling and I know WordPress has many plugins that support copy and paste content and images. However, if you only want to prevent image copying, you do not need to use the plugin for a long time to update. You just need to use the anti-copy (copy) website image with Lucid Gen’s code.
Related posts
Should not copy images on the web?
Why do I ask this question? Actually, if your website is the field of education and learning, you should not be against copying website images. Because the students, students who want to download to study or give presentations, they will give up your website. Or if your website is a beautiful image sharing site is also an example of the case should not be.
So that means, depending on the domain of the website and the website visitors, the behavior of using images a lot or not, we will consider.
Is this 100% protected against copying and downloading images
Similar to all other plugins, regardless of the size, the source (source code) will appear only, which is not 100%. This website’s image copy protection code functions like any other plugin.
- Prevent right-click on the image (right-click).
- Prevent images from dragging and dropping so they cannot be downloaded by dragging them to the computer screen.
- Advantages over plugins: Even if thieves use the action to select all and paste on their website, our photos will not be displayed on their website. This way also helps to avoid wasting information and resources on your website.
How to prevent copying images on the website
Steps to prevent image copying on website:
Step 1: Insert anti-copy code on the website.
Step 2: Turn on Hotlink Protection in cPanel.
Insert anti-copy code code into website
Copy the code for the image below and then paste it in the website according to your instructions.
For WordPress
If you are using a plugin to insert code into WordPress such as Insert Headers And Footers then go to the plugin’s settings. Insert the above code in Footer, before the closing </body> tag.
If you do not have a plugin like that, we will insert it directly into the web theme.
You go to Appearance > Edit interface . Select the correct theme that you are using, find the file named Theme Footer (footer.php) to fix.
You can insert </body> beforehand. Like the picture below, my example.
For HTML and other source code
As principle as in WordPress, you should insert between <body> and </body>. If the website is static, open the html file and insert it.
Bật Hotlink Protection trong cPanel
This is an extra way to prevent copy-type images, embed images directly into their website using your original image link.
That is, your images are only displayed on your website. If left on another website or viewed by the direct link it will return an invalid 403 error.
You are entering cPanel and then navigate to Hotlink Protection.
Here will list available domains in your hosting. You just need to click the Enable button.
That’s it, try opening the link of an image file in an anonymous browser window to check if 403 returns are returned. Because if opened in the current browser, the browser may still cache, so images are still displayed.
Note: If your website uses cache for images, Hotlink Protection may not work as expected.
Conclusion
Doing 2 steps like that is to prevent copy of website image. No plugin needed. If you have a good way, please introduce comments below for your reference.