• by Leftium on 8/31/2021, 4:25:53 PM

    Interesting service. I am building a bookmarking app that needs to load a lot of favicons.

    There are libraries like this: https://github.com/zongyz/get-website-favicon, but I suppose your service is even easier to use.

    The big feature I would be interested in is being able to load multiple favicons at the same time as a sprite sheet: loading favicons one-at-a-time is very slow and inefficient.

    An example of a site that caches favicons as a sprite sheet is https://www.bkmks.com/

  • by knackundback on 8/31/2021, 6:41:45 PM

    Lots of use cases for this! I've used https://clearbit.com/blog/logo/ in the past.

    Results are somewhat different, e.g. compare https://icon.horse/icon/wikipedia.org to https://logo.clearbit.com/wikipedia.org

  • by fiiv on 8/31/2021, 3:36:21 PM

    Hi HN,

    I was working on an app, and in it, we wanted to render an icon for links from meeting invites. This turned out to be quite a pain!

    I found other things that could return icon data, but alas they were all JSON APIs. I didn't relish the idea of fetching an endpoint for each and every website icon I needed to load (and write glue code to render the best icon out of the bunch).

    You'd think favicons are as simple as loading "example.com/favicon.ico" but there's a lot of subtleties to it.

    First, favicon.ico's are often really low res – there's often higher res icons available via tags in the HTML or through the manifest file.

    Second, what if the hostname is unreachable or if there is no favicon at all?

    And third, no one wants to parse a whole HTML page just to get one little icon!

    So that's why I made Icon Horse – it automatically parses the site's HTML to determine the best possible resolution icon. And if no icon is available, it serves a decent fallback, so you never end up with a broken image. And finally, it's dead-simple to use. You simply use the hostname like so:

    https://icon.horse/icon/ycombinator.com

    Anyway, hope you also get some use out of it. I'm around if anyone has any questions :)