Pages Menu
TwitterRss
Categories Menu

Posted by on Jun 18, 2008 in wordpress | 21 comments

Hotlink 2 Link WordPress Plugin

Hotlink 2 Link WordPress Plugin

Here’s a new plugin I’ve written for WordPress users who want to benefit from everybody who hotlinks to their images.

A little background on HotLinking

If you write an article and place an image in your post, that image most likely sits on your web server. Every time somebody views your post, that person’s browser will download the image.

If somebody else likes this image, they can put it in their own article in 2 ways:

1 – Download the image, and upload it to their web server the same way YOU did

2 – Just place a link to the image that is sitting on YOUR webserver

The problem with option 2 is that whenever somebody views the OTHER person’s website, they’re effectivley downloading the image from your web server, and using up your bandwidth.

This might not mean much unless you’re not fortunate enough to have unlimited bandwidth and your website ends up being disabled due to excessive bandwidth usage.

Prevent HotLinking in WordPress

There are a few tricks that you could do to prevent hotlinking, though some of them may be a little too technical and not that easy to get right. If you mess something up, you may end up blocking everybody from viewing your website :P

As I’m sure you know, links are beneficial to your website, and the more the merrier (within reason). So, instead of preventing the hotlinking, why not promote it a little, with a little benefit to you and your blog?

This plugin adds a little code to your website so that when somebody right-clicks on an image, they see a popup asking them to use specific code when embedding images in their own articles.

You can see it in action in by right-clicking the images below.

Here’s an image in a WordPress post:

Here’s the image after somebody right-clicks on it:

Download Hotlink 2 Link WordPress Plugin

This plugin is now available from WordPress plugin directory.

Here’s a direct link to the file from the WordPress.org Extend Page for this plugin:

Download Hotlink 2 Link WordPress Plugin

I do have a forum for discussing this plugin, if anybody would care to use it ;-)

(It is kinda quiet on that side of my world)

Honourable Mentions

This plugin is based on and uses the JavaScript widget “LinkMyPics“.

Oh, and by the way, if you’re into that sort of thing, please consider linking, Stumbling, Del.icio.us.ing, or Digging this… You should be able to use the links on the top right of the page…

Examples of this plugin in use

And, if you want to see one of the first blogs to use it, go take a look at “Innovation Cars“. With all the great images they have on their site, the owner/admin has said this plugin was something they really needed…

21 Comments

  1. This plugin is really what I am looking for, but one question. What could someone do to the existing img that people are leaching already. I have edited the .htaccess needed to stop this.

    RewriteRule .*\.(jpg|png|gif)$ http://www. [inserturl] /theft.jpe [R,NC]

    My thought was to change the upload folder from wp-content/uploads/ to a new folder and change the Rewriterule to only use the old folder but that would not help with new people trying to use old img’s. AAGGHH where was this plug in 3 years ago … lol

  2. I’m not sure about the RewriteRule. I know I used it before but I don’t think I got it right, so I just disabled it.

    Depending on how many images you’re talking about, you could try what I did for my “high-traffic leachers”. I just renamed the image I wanted to something new, and created a new image with a big Ad using the old image name. Then they would kindly display this ad for me. Didn’t really help much, but at least I felt they were paying for my bandwidth. :-)

  3. This is exactly what I am looking for. The plugin does not seem to work with my install, Running WP 2.6.2

  4. Hmmm… Josh, are you getting an error?

  5. I gave it a try too, but it didn’t work for me either. When you right click an image, nothing happens at all, not even a normal menu popup. It could be a result of me using Lightbox though, or a conflict with another possible plugin. Tis a shame, might have helped me build some backlinks. :)

  6. Can’t we have link below image instead of pop-up ??

  7. This plugin worked great for about 5 minutes and then it just quit…any thoughts??

  8. Hi Mike. I’m not really sure, especially since you said that it worked at first.

    Did anything change (like an upgrade or something)? I know I had a couple of issues after an upgrade because I needed to change the file permissions on the script AND the directory.

    UPDATE:

    Ok, in taking a look at your site, I’m thinking it MIGHT have something to do with the message you have. Try taking out the line feed and/or colon “:” from your message. I think the colon is a special character in Javascript and it might be interfering with the code.

  9. I love this plugin! ;) you’re right, backlink is important to us. I have feature idea about this plugin: If someones just linking our images, the images don’t show up (redirect to another images that already set or just blank). But if the images give a link to us, then the images showed up. please consider, that would be useful ;)

  10. Thanks Vidal.

    Your feature request sounds interesting. Not sure how doable it is though. I’ll look into it.

  11. I have wp 2.7 and nothing it’s happen.
    I installed properly

  12. Hi Tomy. Great site with a REALLY addictive game!

    Anyway, it looks like the message you set up in the admin section for this plugin is causing it to fail. Try not to put single quote marks (‘) in the message. I’m not sure EXACTLY what’s causing it to fail, but play around with the message and see what you get.

  13. Hi James, I like your idea. 1 question for you, will this plugin stop image from showing up in Feed?

  14. Hi. It won’t prevent images from showing up in feeds. This is just for images being viewed on your site…

  15. Great plug in. I have been looking for something like this for a long time. Not sure why people are so greedy. You reap what you sow.

    Great work and I really appreciate it. I share my images from the forests and mountains and anything I can do to make it easier helps my visitors.

    I had to do a little hacking to get it to work with my plugins and custom template but it is working great. Thanks again and God bless your work.

  16. Thanks for the kind words.

    Could you explain what you did to get it to work with your plugins and template? And, could you show me a page on your site where it doesn’t work in Firefox but it does in another browser? I’d like to see how it can be fixed.

  17. Hi James, great plugin and much needed!

    I have a couple questions. First, it seems when I first load a page, I can right click and get both the pop up and the normal drop down menu (leaving the chance to copy at least the first image right clicked on a page). I’m not sure why this is, but I’m browsing with Firefox 3.5 on a Mac. When I tested in Safari 3.2 it didn’t work at all… Any ideas would be great.

    Second, any ideas on how to style this so it matches a theme?

    Thanks again for your work!

  18. Hi Drew. Thanks for the compliments.

    I’m actually in the process of upgrading the plugin now. Trying to make it a little prettier as well. I think the popup is quite ugly at the moment (no offense to the guy who wrote it).

    What did you have in mind regarding making it match the theme?

  19. Hi James,

    I didn’t have a specific theme in mind. White might work well for most sites, however ideally (and I have no idea how possible this is, so it’s only a thought) the styling would be in a CSS sheet that we could edit to match whatever theme we’re working with.

    Thanks again!

Trackbacks/Pingbacks

  1. Evitar Hotlink mediante htaccess : Tengo Un.Com.ar - [...] de editar el htaccess a mano, he probado con plugins para -supuestamente- evitar el hotlink pero nada me sirvió, …

Post a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>