DEV Community

Discussion on: How & why I built a favicon fetching service

Collapse
 
peterc profile image
Peter Cooper

Not to take away from your achievement, since I think it is actually better than this, but some may be interested to know Google has a little known API that does something similar, e.g. google.com/s2/favicons?domain=dev.to .. You are limited on size, get no idea about usage policy, and so forth - but I've used it in a personal search engine for years without problems. Icon Horse is probably a better option for future! :)

Collapse
 
mtimofiiv profile image
fiiv

Hey @peterc , great point!

It's true, Google does have this (as does DuckDuckGo as well – external-content.duckduckgo.com/ip...). But like you said, it serves a 16x16 favicon with no options. The API is also meant to be used internally and is there but for the grace of Google – they can change it or remove it without any notice.

I am in the process of adding options to Icon Horse for:

  • preferred sizes
  • format (svg vs. ico vs. png/jpg)
  • specifying a custom fallback like Gravatar does with its avatars
  • serving the icons from your own domain

Any suggestions?