Goodbye avatars .io - hello unavatar!
Given a social media user's username, how do you get a picture of their avatar?
I always used avatars.io - but sadly that service has bitten the dust. So I've switched to unavatar.
It's dead easy to use. https://unavatar.now.sh/twitter/edent
will return @edent's avatar. You can use GitHub, Facebook, Gravatar, Instagram, Telegram, YouTube, SoundCloud, and a couple of other providers.
Simple to use, and easy to embed in an <img>
element.
It's also open source and looks pretty easy to deploy if you want to host it yourself.
Why is this needed?
In an ideal world, there would be a standard for where to find a user's avatar. Possibly a .well-known
resource. Until then, we have to make do with 3rd party services playing intermediary.
Sufian says: