TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: I made a Gravatar-like service for favicons

12 pointsby fiivover 3 years ago

3 comments

Leftiumover 3 years ago
Interesting service. I am building a bookmarking app that needs to load a lot of favicons.<p>There are libraries like this: <a href="https:&#x2F;&#x2F;github.com&#x2F;zongyz&#x2F;get-website-favicon" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zongyz&#x2F;get-website-favicon</a>, but I suppose your service is even easier to use.<p>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.<p>An example of a site that caches favicons as a sprite sheet is <a href="https:&#x2F;&#x2F;www.bkmks.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.bkmks.com&#x2F;</a>
评论 #28370102 未加载
knackundbackover 3 years ago
Lots of use cases for this! I&#x27;ve used <a href="https:&#x2F;&#x2F;clearbit.com&#x2F;blog&#x2F;logo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;clearbit.com&#x2F;blog&#x2F;logo&#x2F;</a> in the past.<p>Results are somewhat different, e.g. compare <a href="https:&#x2F;&#x2F;icon.horse&#x2F;icon&#x2F;wikipedia.org" rel="nofollow">https:&#x2F;&#x2F;icon.horse&#x2F;icon&#x2F;wikipedia.org</a> to <a href="https:&#x2F;&#x2F;logo.clearbit.com&#x2F;wikipedia.org" rel="nofollow">https:&#x2F;&#x2F;logo.clearbit.com&#x2F;wikipedia.org</a>
评论 #28373020 未加载
fiivover 3 years ago
Hi HN,<p>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!<p>I found other things that could return icon data, but alas they were all JSON APIs. I didn&#x27;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).<p>You&#x27;d think favicons are as simple as loading &quot;example.com&#x2F;favicon.ico&quot; but there&#x27;s a lot of subtleties to it.<p>First, favicon.ico&#x27;s are often really low res – there&#x27;s often higher res icons available via tags in the HTML or through the manifest file.<p>Second, what if the hostname is unreachable or if there is no favicon at all?<p>And third, no one wants to parse a whole HTML page just to get one little icon!<p>So that&#x27;s why I made Icon Horse – it automatically parses the site&#x27;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&#x27;s dead-simple to use. You simply use the hostname like so:<p><a href="https:&#x2F;&#x2F;icon.horse&#x2F;icon&#x2F;ycombinator.com" rel="nofollow">https:&#x2F;&#x2F;icon.horse&#x2F;icon&#x2F;ycombinator.com</a><p>Anyway, hope you also get some use out of it. I&#x27;m around if anyone has any questions :)