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>.webpGET
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

gmail.com
/domain/gmail.com.webp

cloudflare.com
/domain/cloudflare.com.jpg

no-such-site-example.org
/domain/no-such-site-example.org.png
How to use it
Three steps from an email address to an <img> tag.
- Take the domainFor
jane@company.comthat iscompany.com. Unicode domains work too. - Pick a formatAppend
.png,.jpgor.webp. No extension means PNG. - 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-SourceandX-EmailAvatar-Icon-Url.- Caching
- Icons are cached at the edge for a day and refreshed in the background for a month.