An avatar for every email address.

Put the domain of the address in the URL and get back its icon, resized to 64 px, in the format you ask for. No icon? You get a generated one. Always a picture, never a broken image.

https://avatar.qsmd.io/domain/<domain>.png
https://avatar.qsmd.io/domain/<domain>.jpg
https://avatar.qsmd.io/domain/<domain>.webp
GET

Examples

Live responses from this service: the site's icon when it has one, a generated avatar when it has not.

github.com
/domain/github.com.png
icon
gmail.com
/domain/gmail.com.webp
icon
cloudflare.com
/domain/cloudflare.com.jpg
icon
no-such-site-example.org
/domain/no-such-site-example.org.png
generated

How to use it

Three steps from an email address to an <img> tag.

  1. Take the domainFor jane@company.com that is company.com. Unicode domains work too.
  2. Pick a formatAppend .png, .jpg or .webp. No extension means PNG.
  3. Use the URLDrop it in an image tag.<img src="https://avatar.qsmd.io/domain/company.com.png">

Details

What every response looks like.

Size
At most 64×64 px, aspect ratio kept, never upscaled.
Source
The site's own icon (apple-touch-icon, favicon), curated icons for webmail providers, then DuckDuckGo and Google as fallbacks.
No icon
A generated avatar, colored and patterned from the domain, so the same domain always gets the same picture.
Invalid domain
Still a 200 with a neutral placeholder image; the status header says invalid-domain.
Headers
X-EmailAvatar-Status (discovered, cached, stale, no-icon, invalid-domain), X-EmailAvatar-Source and X-EmailAvatar-Icon-Url.
Caching
Icons are cached at the edge for a day and refreshed in the background for a month.