hide/protect original full-size images

I was hoping it would be possible to save original images to a separate directory to the resized images so that they could be safely hidden but this seems to be too difficult.

So I am now asking if there are any ways of protecting original full-size images from public but still allow them to view the re-sized images.

I’m not talking about hiding/protecting images on screen, moreover ways of giving original images unguessable url’s or some such scheme to stop them from possibly being downloaded.

ie.

uploads/my_image-200x200.jpg (given this url)

uploads/my_image.jpg (this url can be easily worked out)

6 Answers
6

I was looking for a way to do this and found this page… then I thought of putting this in a .htaccess file in the WordPress uploads folder and it works for me so far… any good?

<FilesMatch "\.jpg$">
    order allow,deny
    deny from all
</FilesMatch>

<FilesMatch "-[0-9]+x[0-9]+\.jpg$">
    order allow,deny
    allow from all
</FilesMatch>

The first part denies access to all .jpg files and the second part searches for files with a size appended to the filename and allows access to those… you could also add directives for any other .jpg files that need to be viewable but all my other graphics are .png files so it’s not a problem for me.

Leave a Comment