How-to

Charts in email: an image, because nothing else runs

Every email client deletes <script> before rendering. There is no JavaScript, no canvas and no chart library in an inbox — so a live chart in email is a raster PNG behind an <img> tag. Here is how to make that image look right in Gmail, Outlook and a Mailchimp-style builder.

Why it has to be an image

Bar chart of weekly signups: Mon 12, Tue 19, Wed 14, Thu 23.
This is a real UrlChart render, not a screenshot: cht=bvs&chs=600x260&chd=t:12,19,14,23&chxl=0:|Mon|Tue|Wed|Thu&chxt=x,y. The same URL is what you paste into an email builder.

The embed

<img src="https://urlchart.com/chart?cht=bvs&chs=600x260&chd=t:12,19,14,23&chxl=0:|Mon|Tue|Wed|Thu&chxt=x,y&chco=2f5fe0&chtt=Weekly+signups"
     width="600" height="260"
     alt="Bar chart of weekly signups: Mon 12, Tue 19, Wed 14, Thu 23."
     style="display:block;border:0;max-width:100%;height:auto;">

Three attributes do the work: the absolute https URL, width/height matching chs (so the client reserves the right box even before the image loads), and alt text that repeats the numbers.

Gmail

The Gmail compose window does not accept raw HTML. Two working routes:

Gmail proxies images through googleusercontent.com and caches them. If you change the chart, change the URL — editing the same URL will not reliably show a new image to a recipient whose client already cached the old one.

Outlook (desktop and web)

Mailchimp-style builders

Paid accounts: the ?key= parameter

Without a key the free tier renders at 60 requests/minute, 1,000 unique renders/month and a canvas of at most 1000 px per side (1 MP); a larger chart is scaled down with a note rather than failing. A paid key raises the limits and the canvas to 3000 px per side (9 MP), and it is added to the image URL like any other query parameter:

https://urlchart.com/chart?cht=bvs&chs=600x260&chd=t:12,19,14,23&chxt=x,y&key=uc_live_…

The key is removed at the edge before the render request and before the cache key, so a paid and a free request for the same chart are the same chart with two tier variants (the free one capped at 1000 px per side / 1 MP), and the key never reaches the render service. A malformed or revoked key returns 401 JSON instead of silently falling back to a free-tier image.

An image URL is public to everyone who receives the email. An <img> cannot send an Authorization header, so the key has to live in the URL — and any recipient can read it in the message source. For external mailings, use a dedicated key for that integration so you can rotate it without touching your other jobs, and treat “key appears in a forwarded email” as a rotation trigger.

Sizing, retina and print

Alt text is not decoration

Most clients block remote images until the recipient opts in, and screen readers never see the pixels at all. Write the alt text as the sentence the chart makes: “Bar chart of weekly signups: Mon 12, Tue 19, Wed 14, Thu 23.” Put the same summary in one line of text above the image, so the email still communicates with images off — and so a broken image is not a blank rectangle.

Changing a chart: version parameters and cache

Chart identity is the query string. Same parameters → same cached PNG for up to a year (successful renders are immutable). Two different kinds of “version” parameter therefore behave very differently:

Deliverability notes

Next: Zapier and n8n recipes (with a downloadable n8n workflow) · Getting started · Parameter reference · Pricing