• I currently am in a dilema of what more I can do to protect images on my blog.

    I have Hotlinking turned on and I also have robots.txt which specifies that images folder should not be parsed by searchbots.

    However, I do notice that if I search for particular images it still pops up in the search results.

    e.g. troyfight.jpg is one such result if you search with Google images. I have even renamed the image on my site but still it points to the correct page.

    Any suggestions on what more I can do?

Viewing 7 replies - 1 through 7 (of 7 total)
  • for google images, info you need should be here:
    https://www.google.com/webmasters/remove.html#images

    Thread Starter Ajay

    (@ajay)

    Thanks criosa. I have added the same to my robots.txt

    Also a friend of mine suggested that instead of keeping the images in /wp-content I place is outside /public_html directory and let PHP fetch the image.

    This way the images cannot be viewed directly but only through the php files.

    How do I do this with WordPress?
    Can I do it by changing the Upload directory under Miscellaneous. Only problem here is URI won’t be settable

    Placing images outside /public_html is a good idea. But no, there would be no permanent URI unless you knew how to redirect with .htaccess. The upload address under ‘Miscellaneous’ will be the absolute file location, e.g:

    /home/sitename/private-content/images
    (no trailing slash)

    Bear in mind, though, to be viewed it will be downloaded, which means people can save them. If you want to discourage even this, you can do what Flickr does: place real pictures underneath a transparent <img> element.

    Oh, and Google’s cache will take a few days to clear out. Best to check back then.

    Thread Starter Ajay

    (@ajay)

    Any idea how Flicr manages to do this? Code?

    As a matter of fact, I do. And I’ll explain.

    The default image size Flickr uses is 500×375. They place the real image along with another blank one inside the same <div>:

    <div>

    <img src="https://static.flickr.com....jpg"
    alt="" width="500" height="375">

    <img style="position:relative; top:-377px; margin-bottom:-377px; display:block;" src="/images/spaceball.gif" alt="" width="500" height="375">

    <div>

    ‘Spaceball.gif’ is a 1×1 transparent jpg that is moved 377px (which includes 2px worth of border) and stretched to cover the entire area of the photo. Inline styles are used because linked stylesheets can be easily turned off. I must say, though, it’s not 100% effective. In order for a user to view an image it must be downloaded, and once downloaded it’s on their machine. And one can always view the source (which is, of course, how I know all this ;-).

    Thread Starter Ajay

    (@ajay)

    Quite a smart method. It will definitely stop normal users from taking your images. Ofcourse the more advanced ones like you will figure it out.

    Let’s see if I can implement this on my blog as well as through my hacks.

    BTW, you got a parse error on your blog

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Protecting Images’ is closed to new replies.