feat(image): add a 1024px size=medium preview tier

Grid and memories tiles requested `size=large` (up to 2048px) for tiles
that display at ~590px (two columns) to ~1180px (one full-width column)
on a 3× phone, downloading 10–15× the pixels they show. `medium` caps
the long edge at 1024: crisp at both, a quarter of `large`'s pixels.
Cached under `_medium/` like the other tiers.

The large and xlarge generators were copies differing only in their
cap; fold them into one `generate_preview(src, dest, max_dim)` so the
third tier doesn't make a third copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cameron CordesandClaude Opus 5.5 committed 2026-10-16 16:01:58 -04:00
1 parent fca9a28cee
commit 94a566b220
5 files changed
+92 -157

No files matched your search

+1
View File
@@ -198,6 +198,7 @@ pub enum PhotoSize {
Full,
XLarge,
Large,
Medium,
Thumb,
}