Method · GUIDE 143
Publishing 472 files through an upload limit meant for 4 MB
A screenshot library grows in the worst possible shape for a single deployment: many small HTML files and a steady trickle of images. Here is how this site is split to stay inside an upload ceiling, and what the split costs.
Editorial diagram · illustrative, not a store screenshot.
The shape of the problem
The built site — this page included — is 472 files and 6.27 MB: 145 HTML pages totalling 2.93 MB, 317 images totalling 3.15 MB, one stylesheet of 15 KB and nine other files adding 169 KB.
The HTML is not uniform. The guides index alone is 177 KB, the RSS feed 67 KB, the llms.txt 43 KB, and the largest single article is 32 KB. That is a lot of text in a handful of files, plus a long tail of small ones.
The ceiling
Uploading that as one bundle fails. The deployment call that publishes this site rejects payloads at around 4.19 MB, so a single worker carrying both the pages and the images stopped fitting as the library grew — the uploads came back rejected rather than merely slow.
The obvious fix — compress harder — does not work on this shape of site. The images are already small, and the ceiling counts the encoded upload, not the rendered page.
Three surfaces instead of one
The site is now three Pages projects. The editorial worker is a bundle of about 1.45 MB carrying 153 files: HTML, the stylesheet, the font, the feed, the sitemap and a few small assets. The header policy and the redirects are not files — the worker sets the first as a response header and answers the second in code. A first assets project holds a frozen baseline of 277 images, 2.98 MB of image bytes inside a 4,001 KB worker. A second assets project holds everything added since the freeze: 40 images, 168 KB of image bytes inside a 228 KB worker.
The freeze is the important part. The baseline does not change, so it can be left in place between deployments; new images go to the append-only project, which is rebuilt on each deploy and carries only what was added since.
What the browser sees
Pages and images are published at different origins, but the document does not know that. Every raster is requested from the same host as the page — /guides/assets/<file>.webp — and a small worker in front of the editorial project does the rest.
The rule it applies is narrow: only paths under /guides/assets/ with a .webp, .png, .jpg or .jpeg suffix are proxied. The stylesheet and fonts are never proxied, so they come from the same deployment as the HTML.
The routing rule, exactly
For a matching raster the worker fetches the append-only project first. If that returns 404 it fetches the frozen baseline and returns whatever comes back. It then rewrites one header — Cache-Control: public, max-age=31536000, immutable — and streams the body through.
So the newest image store is tried first and the old one is the fallback. That ordering matters: the 40 new images are found on the first attempt, and only the 277 frozen ones pay for a miss. A failure other than a 404 is returned without a fallback.
Why same-origin still matters
Because the browser only ever requests the page’s own host, the content policy stays tight: img-src allows the site itself and one image host, and connect-src is set to none. Nothing has to be opened up to a second origin just because the files live there.
That is the main argument for proxying rather than pointing image URLs at the assets origin directly. Rewriting 317 URLs to another host would have meant either loosening the policy or adding a second allowed origin for every image.
What the split costs
Every frozen image costs two subrequests: a miss on the append-only project, then a hit on the baseline. The 40 new images cost one. That is the price of not migrating 277 files. It is paid at the origin rather than necessarily at every view, because the proxied response carries Cache-Control: public, max-age=31536000, immutable — a header that tells any cache it may keep the file for a year.
The other cost is operational: when the baseline is left in place, a publish is two deployments in a fixed order — append-only first, editorial last — with a check of each one’s status before moving on.
When to rebuild the split
The arrangement is a workaround for a limit, not a design ideal, and it has two failure modes worth watching. If the append-only project grows towards the ceiling, the next freeze absorbs its contents into a new baseline. If misses start to dominate — because most images in circulation are new — the ordering stops saving anything and the baseline should be merged forward.
Neither has happened yet at this size, but both are triggered by counts that are easy to watch: files and bytes per project, and the ratio of new images to frozen ones.
Limits
Figures as measured on 1 November 2026 (IST) from the built site and the deployment bundles: 471 files, 6.25 MB total, three projects with the sizes quoted. The upload ceiling is described as observed in practice, not as a documented vendor limit.
No claim is made about load times, caching behaviour in any particular browser, or the reliability of any host. The technique here is one way to stay under a payload limit; it is not the only one, and a platform with different limits would want a different split.
Sources & further reading
File counts and byte sizes were measured from the built output and read from the deployment preparation step; the proxy behaviour was read from the deployed worker source, including the asset suffix test, the assets2-then-assets1 fallback and the cache header. Requirements can change; confirm the current source before upload.