Skip to main content

Asset delivery pipeline

Generated from pattern-library/registry.json — do not edit by hand; change the registry and run bun run patterns:build.

Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.

Category: Runtime Velocity · Tier: light · Maturity: implemented · Risk: low — delivery concerns only

Keeping images and fonts from dominating page load: generated icon sets, an R2-backed image proxy with stale-while-revalidate headers, and a document-weight ceiling that catches inline-SVG bloat.

When to use: Use wherever media is served — the JavaScript budget usually gets the attention while the bytes are elsewhere.

Docs

Code

  • scripts/pwa/generate-icons.ts — sharp-generated icon set (GitHub · GitLab)
  • src/routes/api/blog/assets/[id]/image/+server.ts — Published-only image proxy with SWR cache headers (GitHub · GitLab)

Machine-readable record: velocity-asset-delivery in pattern-library/registry.json.

← Back to Pattern Library

Think this pattern could be better? Tell us how.

Leave feedback