Follow me on Twitter

Use Google Images to build links: Wordpress Plugin

by Patrick Altoft on June 17, 2007

Update: A new version of this code can be found here.

My earlier post explaining how you can use hotlinkers and Google Images to build backlinks to your website has created a storm of excitement as well as a certain amount of confusion from a few readers who were not quite sure how it worked.

If you missed the original post then I suggest you take a look, it has a nice example of the script in action.

The basic idea with this script is that a potential hotlinker finds a page on your site via Google Images. Normally the hotlinker will simply right click on your image, copy its location and insert the image onto a myspace page or somewhere similar. The script detects when the hotlinker right clicks on your image and brings up a text box with some code so that they can insert the image along with an appropriate link back to your site.

Most hotlinkers won’t bother to remove the link and the result is a continually increasing number of natural links to your website with no ongoing effort. Perfect.

I have created a short video so you can see how the script works in practice.

My first recommendation is that you install the Break out of frames Wordpress plugin so that your site isn’t locked into the Google Images frameset. This will mean more visitors to your site as well as an increased likelihood that they will visit more than one page.

Next you will need to upload the Hotlink Builder Wordpress Plugin and activate it. There is a control panel where you can edit the message that hotlinkers will see.

To test the plugin simply search for some images from your site using Google Images, when you click through and right click on the image the plugin should reveal the html code required to use the image.

Any problems please post in the comments below.

You can get our blog posts delivered for free by email every day - simply add your email address to the box below or alternatively grab the RSS feed.

Read some similar posts

Post category: Link Building   Share it : delicious | digg | reddit | StumbleUpon | Google Bookmarks | Sphinn

{ 28 comments… read them below or add one }

Witty 17 Jun 2007 at 4:44 pm

I can’t get this to work properly, when you right-click on the image it does nothing but bring up the regular browser menu.

Patrick Altoft 18 Jun 2007 at 3:59 pm

There are a couple of bugs with the script affecting certain versions or Wordpress. We will be re-releasing the script within 24 hours to resolve these issues.

Byron 19 Jun 2007 at 4:09 pm

Thanks for the update, this looks very promising. I will wait for the update to test.

Keith 20 Jun 2007 at 4:40 pm

People hotlink to my images all the time so thank you very very much for making this plugin!

I’m testing it on a site that uses WP 2.0.6. So far it seems to work great in Firefox but for some reason it’s not working at all in IE. I looked at the source code and none of the plugin code was there – as if the plugin wasn’t even turned on.

Also, here are some ideas that might make this plugin even better:

1. Generate code for all the images in the post and not just the first image. I don’t know if that’s possible but it would sure be cool.

2. Add an option to adjust the cookie time from the “Hotlink Builder Config” page.

3. Add “clear: both” to the imagelayer div. I have adsense at the top of my template displayed with “float:left” and it was causing the ads to show up within the imagelayer div.

Thanks again for a great plugin!

Patrick Altoft 20 Jun 2007 at 5:46 pm

Hi Keith,

If the plugin code isn’t being turned on it sounds like the cookie isn’t being set somehow. Maybe you have IE set up to reject cookies?
The cookie length and css of the div layer can be adjusted in the plugin source code, we left it fairly generic so users could adjust it. If you can’t edit this yourself send me an email with your requirements and I will edit it for you. Smile

Keith 21 Jun 2007 at 5:12 pm

Hi Patrick,

You’re right about IE rejecting the cookie. The privacy setting was set to Medium. When I lowered the privacy setting the plugin worked.

Thank you for offering to edit the css and cookie length, but I was able to figure it out. There is one more thing I’d like to do. Is there any way to add the post title within a title attribute in the href tag?

Patrick Altoft 22 Jun 2007 at 5:05 am

You would need to use the Wordpress post title function and add this to a title tag in the link.

The link is right at the bottom of the script.Smile

Shell Harris 22 Jun 2007 at 9:30 am

This is a very helpful plugin. Thanks for providing it Patrick and thanks for the invitation to great blog. I will definitely be visiting more often.

Keith 22 Jun 2007 at 10:04 am

The Wordpress post title function worked.Smile

Thanks again for a great plugin Patrick!

solution2u 28 Jun 2007 at 12:01 pm

Hi. Nice plugin. But no matter I right click on any images, it always point to same image. You can try to right click on your feed image, you will get what I meant Smile

Jesse 04 Jul 2007 at 7:07 pm

Excellent plugin. I’m impressed.

We are using it on our cake site (http://blog.pinkcakebox.com)- people are hotlinking often without linking back.

I did notice that the imagelayer div shows up at the top of the post, which isn’t always ideal. Ideally the div would show up directly above the image or as a popup. ..something to think about

Jesse 04 Jul 2007 at 7:25 pm

One more comment. I noticed that this plugin will always default to the first image in a post.

This becomes problematic in posts with multiple images. Also, in my case, yahoo image search loves to link to my main site, rather then individual posts, so this plugin does not work well in that case.

In any case, still a useful plugin.

Gerhard 12 Jul 2007 at 3:59 pm

Doesnt work together with plugin:
wp-table from http://alexrabe.boelinger.com/
Would be nice to use it.

Will Spencer 17 Jul 2007 at 2:43 am

Is there going to be a version for non-Wordpress sites? Smile

Patrick Altoft 17 Jul 2007 at 5:53 am
Tong 18 Jul 2007 at 3:25 am

Can you make it work for multiple images?

Tong 18 Jul 2007 at 3:26 am

Anyone else find it hilarious that this plugin hotlinks?

http://www.mad4mobilephones.com/images/close.gif

MLS 24 Jul 2007 at 3:39 pm

Great plugin. Unfortunately, I had to stop using it when I noticed it’s not compatible with another great plugin, Post Teaser.

If I enable the hotlink plugin, the post teaser plugin stops trimming the posts.

If you can find a work around, would be great !

Egonitron 21 Aug 2007 at 6:34 am

I’m also having an issue with it only letting you use the first image in a page. I’m going to have to uninstall it if this isn’t fixed.

bendust 03 Sep 2007 at 2:26 pm

First, thanks for the script.
How can i activate it for all visitor?

Will Critchlow 21 Oct 2007 at 3:52 pm

Hi bendust – I’ve just been corresponding with Patrick about that. I have modified his plugin to do exactly that as I needed it for one of our blogs:

modified image hotlink builder wordpress plugin

Dag 29 Oct 2007 at 7:40 pm

If you have 1 image in every post of 10 posts on the page and the user right clicks on the say 4th post image the box will show up in the top of the first post with a image on the page with the first posts image details not the details for the image they had clicked on. Any Fix for this?

Robert Irizarry 30 Oct 2007 at 10:58 am

Interesting idea but works fine on my home page. However, it breaks any single page post. The text around the first image as well as the first image end up at the very top above the header and menu bar! Then the rest of the content follows. Very strange. Any thoughts?

Alex 25 Nov 2007 at 2:15 pm

This would be such a great plugin, if only the bugs would be fixed !

This plugin does not work with the post excerpts plugin, causing full pages to be shown on the homepage, etc. This is a huge problem for me, and I’m sure lots of other people.

Think this can be looked at and fixed?

Enrico 03 Nov 2008 at 7:43 am

HI Patrick,

I’ve followed all the instructions but it looks that the plugin not works for me.

I right click on the images on my blog and i can’t see the hotlink.

Please can You help me?

Thx

Carlito 28 Dec 2008 at 6:43 pm

Excellent idea. Unfortunately, the plugin is a little buggy. If there’s ever an update, I’ll gladly use it.

Your Custom Blog 05 Feb 2009 at 5:24 am

I agree. I installed the updated (for WordPress) version. I search google for ”
yourcustomblog“, find an image (below) and right–click produces no result.

ALSO — incompatible with Next-Gen gallery.

Good try — back to the drawing board.

I say everyone here chip in $5 $10 $20 to encourage him to fix it.

OR

the money goes to whoever gets a new working version first?

i can’t code that well in PHP yet…but i am down to contribute and participate.

what do you think?

http://yourcustomblog.com/wp-content/uploads/ycb-sm2.png

from (URL of page):

http://images.google.com/imgres?imgurl=http://yourcustomblog.com/wp-content/uploads/ycb-sm2.png&imgrefurl=http://shawnnichols.com/home/&usg=__jRP_v8n3w3ZJFHoWRf-4W1hkkHM=&h=306&w=175&sz=49&hl=en&start=10&um=1&tbnid=Qr3MGXMQIUnd_M:&tbnh=117&tbnw=67&prev=/images%3Fq%3Dyourcustomblog%26um%3D1%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26sa%3DN

(original search):

http://images.google.com/images?q=yourcustomblog&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&hl=en&um=1&ie=UTF-8&sa=N&tab=wi

Patrick Altoft 05 Feb 2009 at 10:33 am
Find me on Twitter

{ 1 trackback }

Lesson 2: Getting Started - Let’s Rock! | WordPress Plus SEO
03.11.08 at 1:10 am

Leave a Comment (registration is optional)

Registration is free, takes about 5 seconds and is worth doing.

You can use these HTML tags and attributes: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>