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.
What happened to the OSS https://www.libravatar.org/ ?
On the topic of Avatars, I’ve been frustrated that it appears impossible to find out how to set the Gmail avatar from a non-Google account! https://support.google.com/mail/thread/56463134?hl=en
What a mess.