# The HTML Report Is Too Big to Email — Shrink It, or Stop Attaching It

Canonical: https://commareports.com/fix/html-file-too-big-to-email
Published: 2026-09-07

> Gmail caps attachments at 25 MB, Outlook at 20, and a self-contained report blows past both. What is actually making the file large, how to cut it, and the delivery that has no cap.

# The report bounced: attachment too large

`Message exceeds the maximum size` — or worse, no bounce at all and a
recipient who never mentions it.

## The limits you are hitting

| Where                          | Cap                                            |
| ------------------------------ | ---------------------------------------------- |
| Gmail                          | 25 MB (auto-switches to a Drive link above it) |
| Outlook.com / Exchange default | 20 MB                                          |
| Many corporate gateways        | 10 MB, or lower                                |
| iCloud Mail                    | 20 MB                                          |

And a detail that catches people: attachments are base64-encoded in
transit, which inflates them by about a third. A 20 MB file is roughly
27 MB on the wire — over Gmail's cap despite looking under it.

## What is making it big

In descending order of blame:

**Inlined chart libraries, repeatedly.** `plotly.js` is around 3 MB.
Export ten figures with `include_plotlyjs=True` on each and you have
inlined it ten times. Inline once:

```python
parts = [fig.to_html(full_html=False, include_plotlyjs=(i == 0))
         for i, fig in enumerate(figs)]
```

**Base64 media.** Screenshots, videos and traces in test reports. In
Playwright, `screenshot: 'only-on-failure'` and `video:
'retain-on-failure'` usually remove most of the payload with no loss to
anyone reading a green run.

**The whole dataset, embedded.** Reports that support client-side
filtering ship the raw rows. Aggregate to what the charts actually plot,
or cap the table and link the full extract.

**Font files, inlined.** Rarely worth their size in a report nobody
prints.

`gzip -9 report.html` will often cut what remains by 80% — but a
recipient who has to un-gzip is a recipient who might not.

## Why zipping is a bad answer

It is the reflex, and it introduces two problems:

1. Corporate mail gateways commonly quarantine or strip archives that
   contain HTML, because that combination is a phishing pattern. The
   message arrives with the attachment removed and no explanation.
2. The recipient unzips and double-clicks `index.html`, landing on
   `file://` — where XHR-loading reports render blank
   ([Allure](/fix/allure-report-blank-page),
   [Playwright](/fix/playwright-report-blank)) and relative asset paths
   break ([lost CSS](/html-report-broken-css)).

Email clients also strip `<script>` and external stylesheets from
inline HTML bodies, and Outlook on Windows renders with the Word engine —
no flexbox, no grid. Details in
[emailing an HTML report](/email-html-report).

## Send a link instead

There is no attachment cap on a URL. Publish the report, paste the
address:

- It opens in the browser, on a phone, in a Slack unfurl.
- Interactivity survives — scripts run in a sandboxed iframe
  (`allow-scripts`, no `allow-same-origin`).
- Access is per-report: private, invited people only, anyone with the
  link, or public.
- Replies land as comments **on the paragraph in question**, instead of
  a reply-all thread where nobody can tell which chart "this number
  looks wrong" refers to ([comment on HTML](/comment-on-html)).

**Limits:** entry HTML 5 MB; assets 25 MB per file, 250 MB and 500 files
per report — so the multi-megabyte media that broke your mail server
uploads as assets rather than being inlined into the document.

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.

**[Publish the report and send a link →](https://commareports.com/)**

### Related

- [Email an HTML report](/email-html-report)
- [Share an HTML report with a client](/share-html-file-with-client)
- [Share an HTML folder](/share-html-folder)
- [Stop screenshotting reports](/stop-screenshotting-reports)
