Manifest — ship dimensions in the bundle
At build time, preimage-manifest ./public/photos --out photos-manifest.json walks the photo directory, probes each file's header bytes (~4KB each, no decode), and emits a JSON of { url: { width, height } }. At client startup, iterate the manifest and call recordKnownMeasurement(url, w, h) from @somnai-dreams/preimage/core. prepare(url) now resolves synchronously from cache for every URL in the manifest — no probe, no network round-trip, layout commits in microseconds.
Both panels clear the library caches and cache-bust URLs each run, so the cold side genuinely pays the probe cost. They lay out the same 34 photos into a shortest-column grid.
Manifest contents ( entries)
Cold prepare() — probes dims over the network
Dims probed—
First dims known—
Layout committed—
Source tag—
Hydrated prepare() — recordKnownMeasurement from manifest
Dims probed—
Hydrate time—
Layout committed—
Source tag—