. . .

Protect Magento Product Images from getting Stolen

Published: November 18, 2011

It is good that magneto offers watermarking for securing the catalog/product images but this security is not sufficient for advance internet users. Suppose, following is the link for your watermarked image

    http://www.yourwebsite.com/media/catalog/product/cache/1/image/de684549e4151748e56ee0dd7902c19f/m/y/my-first-image.jpg

But if anyone removes the cache/1/image/de684549e4151748e56ee0dd7902c19f part of URL so that it becomes

    http://www.yourwebsite.com/media/catalog/product/m/y/my-first-image.jpg

He can view the image and copy it. To avoid your Magento catalog images fron getting stolen, put an .htaccess file in media/catalog/ folder in Magento with following code in it

Options +FollowSymLinks
RewriteEngine on
#Following line allows the actual images to be accessed by admin end directly
RewriteCond %{HTTP_REFERER} !^http://www.yourwebsite.com/.*$ [NC]
#Following line allows the watermarked images to be accessed directly. Rule says that if URL does not contain cache
RewriteCond %{REQUEST_URI} !(/cache/) [NC]
#This is the page where visitor will be redirected if tries to access images directly.
RewriteRule .(gif|jpg)$ http://www.yourwebsite.com/do-not-try-to-steal-images.html/ [R,L]

 Hope this helps.

Don't forget to share this post

    Let's Build Digital Excellence Together


    • Cost Efficient Solutions.
    • Minimal Timelines.
    • Effective Communication.
    • High Quality Standards.
    • Lifetime Support.
    • Transparent Execution.
    • 24/7 Availability.
    • Scalable Teams.

    Join Our 200+ Happy Clients Across Globe


    Free Consultation.

      Do you need help in strategy, innovation or growth of your startup/business? Experts from our team will get in touch with you.

      Please do not post jobs/internships inquiries here.