How to stop people linking to your images

It is often infuriating when you find people linking to your images online. Firstly they are stealing your bandwidth, and while this may or may not be a problem depending on your host (and the popularity of the site doing the stealing) it is just not polite.

Secondly there is the issue of copyright theft, people using your images without permission, often giving the impression they own, or even created them, themselves. Again, depending on the site/person doing the stealing it may or may not be an issue.

There are a few ways of dealing with this, I will go into just a few of them in this post.

Firstly, you really want to establish whether or not the person linking you image is doing it deliberately and whether they know it is wrong. The first move is usually to simply ask them to remove it.

If you establish this is a deliberate act there are some options open to you:

  • Legal (mostly over the top and expensive)
  • Pass on the responsibility (i.e. ask their ISP to remove the site for copyright infringement)
  • Revenge (will go into this later)
  • Prevention (Instructions below)

I will explain the above points one by one:


I am not a fan of premature legal action, I think it is often over the top and unnecessary. It is nice to have the option to hand but I would personally keep it as a last resort.

Pass on the responsibility

This is often a good low-effort way of dealing with things. ISP’s don’t like lawyers and they also don’t “usually” know if you are one. If you drop them an email asking them to remove the offending site due to copyright infringement (or even better drop them a letter) then they will often act pretty quickly. This really does depend on the ISP though, so there are mixed results for this method.


If you are SURE they are doing it deliberately stealing your images then follow these steps to make their eyes water (or just give them bad press)

  1. Rename your image
  2. Change the link in your HTML to match the new name (so it looks the same on your site)
  3. Change the image (e.g. boat.jpg) to an image of something “different” (you know what I mean)

As long as the linked image has the same filename then people going to the offending site will no longer see the picture of a “boat” but will either see a jpg with your own message or an image of your choice 😉


This way is usually the best way of preventing people linking your images (it won’t prevent them stealing them though, but that is another issue)

As long as you have an Apache server (most are) then put a file called “.htaccess” (don’t forget the dot!) into your images folder.

Add the following lines to it, and save it:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]

With this in place, any gif or jpg images linked from anywhere other than your site will fail to display.

Like doctors often say, prevention is best. I do agree with this, but I also believe “revenge is sweet” 😀