If, like me, you have blogs where you use to have an image at the very beginning of your posts then you should know that people expect to access your post by clicking on the image (I tested this with CrazyEgg).
That’s why I came up with the Linked Image plugin. This little plugin does just that, it takes the first image in your post and links it to the post itself. Everywhere but in the post page.
Download
Installation
- Download the plugin and expand it.
- Copy the ‘first-image-permalink.php’ file into your plugins folder (wp-content/plugins/).
- Login into the WordPress administration area and go to the Plugins page.
- Locate the First Image Permalink plugin and click on the activate link
- That’s it
Known Issues
- The plugin doesn’t currently work if the first image is already linked and may render unexpected results.
- Smileys get linked too
Donate
Support further plugin development by making a small donation:

Thanks a lot for this pluging. Just downloaded, go to see how it works
cool plugin
it worked for me
thanks a lot
You’re very welcome. Please do not hesitate to contact me if you have any problem at all.
hello man
i need my link open in new windown,an ur teacher me to setup it??
@asian beauty talk: If you’re able to edit the plugin file (linked-image.php) then all you have to do is locate the part that says <a href=”‘.get_permalink().’”>$1</a> and change it for <a target=”_blank” href=”‘.get_permalink().’”>$1</a>
Excellent, tks Wessley, works out of the box!
does it works for older posts too?? Or it will work only for new posts??
@Khamosh: Yes, it’ll work for older posts as well.
Only one question…
If I add the image to the post trought the image uploader on WP2.5+, can the plugin retrieve the thumbnail of the image generated by the image uploader instead the image itself?
I wanted to do this long time ago, and I don´t know that if this plugin capable of this.
Downloading. Giving it a try. A very useful plugins if it works for me
Great plugin.
Awesome idea and great plugin! Thank you very much!
Nice and simple.. Would make sense to implement the filter in “the_excerpt”, too. I’ve also the one problem that smiley-pictures are linked.. To avoid this you have to put something like this in the “if”:
$content1 = preg_replace($searchfor, $replacewith, $content, 1);
$smiley = substr_count($content1, ‘wp-smiley’);
if (!$smiley) $content = $content1;
Sorry, my code sucked
But when you replace the $smiley-line with
preg_match ($searchfor , $content , $smileys);
$smiley = substr_count($smileys[0], ‘wp-smiley’);
it should work.. though I guess there are better ways to do this
@Andy: You’re right… I didn’t realize smileys would get linked as well. Thanks for the suggestions, I’ll try to fix this asap.
hi. Thanks for plugin
perfect.
regards
can u pls tell me the coding if i want to make first three images as the permalink of the article …
thnx for a wonderful plugin
@Jaspal Singh: You would replace the “1″ in this line: “$content = preg_replace($searchfor, $replacewith, $content, 1);” for a 3. Like: “$content = preg_replace($searchfor, $replacewith, $content, 3);”
Excellent idea. Do you or anybody know if it conflicts with this plugin from Justin Tadlock? -
http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin
this is pretty cool. Btw, can it also capture the post title to be the image caption and alt tag?
Thanks and hope to see more improvement.
@gofree: It could. Definitely something to consider for a future version.