add: harden thumbnail generation and validate image assets
All checks were successful
Deploy on push / deploy (push) Has been skipped

This commit is contained in:
2026-03-22 20:04:26 -07:00
parent 3439fc834f
commit 21c3a0c4b2
5 changed files with 461 additions and 13 deletions

View File

@@ -34,6 +34,12 @@ If you only need to regenerate thumbnails, run:
npm run build:thumbs
```
To force a full thumbnail rebuild, run:
```sh
npm run build:thumbs:force
```
## Image Conventions
- Full-size images and thumbnails share the same numeric ID
@@ -45,6 +51,7 @@ npm run build:thumbs
## Thumbnail Focus
Thumbnails are generated from `images/fulls` with `sharp` at `240x320`.
The generator auto-rotates images using EXIF orientation, skips unchanged files by default, and removes stale thumbnail `.jpg` files that no longer map to a meal entry.
For images that should crop away from the center, add optional thumbnail focus metadata to the meal entry: