carlos / platform Public

Image transforms: media stage 2, with three apps waiting Feature Request open

Summary. Schedule media roadmap stage 2 (docs/superpowers/specs/2026-09-07-media-platform-roadmap-design.md §4): synchronous image transforms behind app-declared named presets (/p/<key>?t=thumb and the secret and private forms). #107 lists it as task B, "filed, not scheduled". This thread is the request to schedule it, with the consumers named.

Who needs it:

  • rastrillo (rastrillo#59, operator decision 2026-10-01). The framework will not ship its own image resizing. Apps on rastrillo get thumbnails and display sizes from platform presets, and serve originals until stage 2 exists. The rastrillo/media URL builder in roadmap stage 5 is the framework's side of this.
  • Tito Go, which today crops, scales and re-encodes in-process (internal/imaging: header probe, crop, scale with x/image/draw, PNG/JPEG encode, 40M-pixel decode cap). It writes renditions under assets/r/<token>.png on its own S3 client, with a sweeper (rendition_sweep.go). Its uses include picture and photo-grid uploads in the message editor, customize and theme images, and favicons. Every one of those is a fixed set of output sizes, so they map onto named presets.
  • Docs, whose "insert image" is disabled pending media (roadmap §1).

What the consumers need from v1, all already in the roadmap's stage 2 text:

  • Resize and crop to a declared box.
  • Format chosen by Accept.
  • Metadata always stripped. Tito strips by re-encoding today; GPS in a public photo is the case that matters.
  • A pixel-count cap on the source.
  • Derivatives counted against the app and removed with the source.

Not needed for v1: smart crop, watermarks, animated formats or SVG rasterisation, matching the roadmap's "not in stage 2".

Order. Blocked on #107 (stage 1, kind:media). The roadmap's engine spike (wazero codecs, vips, or a Rust helper, measured on a t4g.small) can run before stage 1 lands, and would de-risk the schedule.