Process — OG image generation
Process — OG image generation
Section titled “Process — OG image generation”Source: docs/superpowers/specs/2026-05-23-07-public-site-archive-design.md §5. Generates cdn.nowyourlink.com/og/daily/{date}.png via @resvg/resvg-wasm (per research/astro-cf-monorepo-patterns.md §1; deferred item in master §9 resolved here).
Key invariants:
- Resvg-wasm is loaded once at module scope; cold-start cost amortises across the worker isolate’s lifetime.
- A KV mutex (
og:lock:{date}, 10 s) prevents thundering herd on first hit. - Cloudflare Images is not used (master §10.2 cost discipline + research §1) — one PNG/day cached aggressively in R2 + edge.
- The R2 object key is the cache key; admin purge deletes both R2 + edge cache atomically.