Plugin that inserts favicon next to links

I, like many others, have numerous links all over my website. Some are in the body, some are in the sidebars, some are in comments. When links go to an external site, I would very much like to have that website’s favicon appear to the left of the link. I have seen this in many places. E.g a link to Wikipedia page, should have that wikipedia favicon.

The plugin File Icons appears to do that, but for file types (you link to a PDF, you get a PDF icon). But the question is, how do you do this for general types of links? You could add URLS to the File Icons plugin by hand, but that is a pain, and I have heard of Google’s S2 which should find most fav icons automatically.

Read More

So my question is; is there a plugin that will auto find any links on a post/page/etc. and insert the URL’s fav icon to the left of the text?

Related posts

Leave a Reply

2 comments

  1. (from the closing duplicate)

    I typed this plugin very quickly during posting this…

    It seems to work, see http://leau.co (where I quickly tested it) or http://edward.de.leau.net (where I have tested it against more links in the post content) e.g. see the bottom left sidebar or some posts with multiple links in it.

    Hmmm, I will add in v0.3:

    • caching
    • file types to ignore
    • if i find out how a different default icon
    • urls to ignore

    Notes:

    Update:

    In the meanwhile it is to version 0.4.8 and scans pages directly for icon tags, /favicon.ico in root, checks google and other provides. IT also can replace content in any area where filters are provided, there is after processing support for the image such as auto png conversion, can excluded urls by extension, provides defaults such as identicons and has a cache.

    version 0.4.8 temporarily disables ALL of this (read http://wp.leau.co/2011/03/04/wp-favicons-part-1-preventing-duplication-of-meta-data-attached-to-uris-such-as-favicons/) except for ‘check google’ so lets wait for 0.4.9 which gets it going again.

  2. You can try Karedas Favicon:

    Add 16×16 favicon after all the links
    in your posts. The favicon’s tag has a
    ‘favlink’ class so you can CSS it as
    you wish.

    There are lots of plugins if you search for “favicon” on the WordPress plugin database.

    If you were to develop such a plugin, I wouldn’t rely 100% on the Google Service. I would check the link’s html, and try to get a favicon in the W3C standard way:

    <link rel="icon" type="image/png" href="http://example.com/myicon.png">
    

    In case that code is not present, check for others:

    <link rel="Shortcut Icon" href="http://example.com/favicon.ico" type="image/x-icon" />
    

    Or look for the favicon.ico|png file on the domain root (a usual way to use favicons).

    If none of these do return an icon, use the S2 service.