Carol — back to Apps ← Apps

Carolopedia

A friendly guide to Carol, her ecosystem, and the agents who built her.

📖 CarolopediaServicesBuild InitiativesAll activitiesINI-100000292
📋

CAROL-INI-0927-00: Speed up image loading in Carol bio and Orion logbook: serve cached WebP with long cache headers

Initiative
Open in Initiatives →

📖About

Carol bio (40-60 portraits at once) and the Orion logbook serve raw PNGs averaging ~2MB each (some 3.6MB), with no cache headers, so a bio visit pulls ~80-100MB and repeat visits re-download everything. Fix: a shared web-optimised image cache (shared/webp_cache.py) that returns a cached WebP copy of a source image (resize to max 1600px, quality 88; ~11x smaller, measured 1.9MB -> 168KB), generated on first request, originals never modified (fully reversible). Wire it into both image-serving routes — Carol web servers gallery route (/static/gallery + /api/carol/gallery-img) and the image generators /media route — and add Cache-Control: public, max-age=31536000, immutable on both. Fail-soft: serve the original if conversion fails. No HTML/url changes. Implement via Orion bypass, twin-review.

Success criteria

  • A shared WebP image-cache helper exists; originals are never modified (must_have)
  • Carol bio images served as cached WebP with a long cache header (~10x smaller) (must_have)
  • Orion logbook images served as cached WebP with a long cache header (must_have)
  • Conversion is fail-soft: original served if WebP generation fails (must_have)
  • No image URLs or HTML changed; pages render identically (must_have)