Skip to main content
Use case prompt
A receipt or an invoice with the customer’s own logo looks made for them, and it is easier to find in a busy inbox. Documents need a file, not a hosted image: a PDF embeds the bytes, and an email can be opened years later. Your app stores the logo and the color once per customer and reuses them in every document.

Store the logo and the color once per customer

Look the brand up on your server with the Brand API. One GET /v2/brands call returns the logo’s download URL and the brand’s colors. Download the logo as a PNG, because many email clients don’t show WebP, and keep the file. See self-hosting for how downloads and refreshes work.
customer-brand.ts

Add the logo to an email

Link the stored file from your own domain, in a plain <img> tag with a fixed width and height. Email clients ignore most CSS, so set the size as attributes:
receipt-email.ts

Add the logo to a PDF

Read the stored file, and pass its bytes to your PDF renderer. A PDF never loads anything from Logo.dev at render time.

Test the documents

Send a test email to Gmail, Outlook, and Apple Mail, and check that the logo loads with images turned on. Create a customer with a logo, one with no logo, and one whose brand is still indexing. Generate an invoice PDF for each.

Self-hosting

Download logos through the Logo API and keep them current.

Onboarding personalization

Use the same brand data to prefill a signup.