Showing customer avatars in a CRM or support inbox

Turn a list of email addresses into faces and company logos: what to look up, how to handle privacy, and how to keep it fast.

A support inbox or CRM full of grey circles is harder to scan than one with faces and logos. Your records usually have an email address and sometimes a company domain or a social handle. Here is how to turn those into pictures.

What to look up, in order

  1. The person, by email. Gravatar covers people who signed up for it; GitHub covers many developers. Check both.
  2. The company, by email domain. If the person has no picture, a work email still says where they work. A company's BIMI logo, or failing that its favicon, beats a grey circle.
  3. A social handle, if you have one. Many CRMs store an X, LinkedIn, or GitHub handle.
  4. Initials, when everything else misses.

avatarapi's /email/:address does steps 1 and 2 in one request: it races Gravatar and GitHub, then falls back to the domain's BIMI logo.

<img src="https://avatarsapi.com/email/jane@stripe.com?size=64" alt="">

Skip the domain fallback for free mail providers (gmail.com, outlook.com): a Gmail logo next to a customer is noise. Check the domain before you render and go straight to initials for those.

Privacy: keep raw emails out of URLs

An email in an image URL can end up in browser history, proxy logs, and Referer headers. Two mitigations:

Unsalted hashes are not anonymous, since common addresses can be guessed, but they do keep plain addresses out of logs.

Keep it fast

Pick a Plan that fits a real inbox

Anonymous use is for trying it out. A CRM shows the same faces all day to many agents, so put it on a Project: free Projects come with a browser-safe pk_ key and a daily allowance, and Starter removes the daily cap and the attribution link. See current limits.

<img src="https://avatarsapi.com/p/pk_…/email/jane@stripe.com?size=64" loading="lazy" alt="">

Related

Try it: put https://avatarsapi.com/github/torvalds in an <img src>. No key, no signup. Read the docs or create a Project.