# Company logo from an email domain: BIMI explained

> BIMI lets a company publish its official logo in DNS. Here's how the record works, how to read it, and how to use it to show a logo for any work email.

Published 2026-10-19 · https://avatarsapi.com/blog/company-logo-from-email-domain-bimi

You have `jane@stripe.com` and want to show Stripe's logo next to her name. The best source for that logo is one most developers have never heard of: BIMI.

## What BIMI is

[BIMI](https://bimigroup.org) (Brand Indicators for Message Identification) is a standard that lets a domain publish its official logo so email clients can show it next to messages. The logo lives in a DNS TXT record:

```
default._bimi.example.com.  TXT  "v=BIMI1; l=https://example.com/logo.svg; a=https://example.com/vmc.pem"
```

- `l=` points to the logo, a square SVG in the restricted "SVG Tiny Portable/Secure" profile.
- `a=` optionally points to a certificate (a VMC or CMC) that proves the brand owns the mark. Gmail requires it to show the logo.
- Mailbox providers only honor BIMI when the domain enforces DMARC (`p=quarantine` or `p=reject`).

Those requirements are why BIMI logos are good: a company that publishes one has gone to the trouble of setting up email authentication, and often of certifying its trademark. The logo is square, vector, and official.

## Reading it yourself

1. Look up the TXT record at `default._bimi.<domain>`. In a Worker or browser, a DNS-over-HTTPS endpoint works: `https://cloudflare-dns.com/dns-query?name=default._bimi.stripe.com&type=TXT` with `accept: application/dns-json`.
2. Parse `l=` out of the record.
3. Fetch the SVG, check it really is an image, and serve or cache it.

Most domains do not publish BIMI, so you also need a fallback for the rest.

## One URL that does it, with fallbacks

```html
<img src="https://avatarsapi.com/domain/stripe.com?size=64" alt="">
```

`/domain/:domain` walks a Ladder: BIMI first, then DuckDuckGo and Google favicons if there is no BIMI record. Whatever it finds is fetched and validated as a real image before it is served. If nothing usable exists, you get a 404 with `"code": "ENOTFOUND"`.

For a work email, `/email/:address` goes one step further. It checks the person first (Gravatar and GitHub, raced), and only then falls back to the domain's BIMI logo:

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

That gives you a face when the person has one and a company logo when they do not, from a single `src`.

## Related

- [Favicon APIs compared](/blog/favicon-api): what happens when there is no BIMI record.
- [Clearbit Logo API alternatives](/blog/clearbit-logo-api-alternative): when you need a full logo database.
