This was generated by AI during triage.
Parent
#32
Problem
The 11 active team photos in posts/assets/team/*.{jpg,jpeg} total ~30 MB on disk. 7 of them are above 2 MB, with damien-robert.jpg at 7.6 MB, mariette-baudras.jpg at 4.4 MB, louis-strauss.jpg at 3.5 MB. These are unoptimised originals at full camera resolution — many multiples of what any web layout actually displays.
Migrating them as-is means: paying for 30 MB of Vercel Blob storage forever, pushing all those bytes through bandwidth, and degrading LCP on every page that loads a team member avatar.
Doing this before #36 (push to new store) avoids re-doing the upload.
What to build
posts/scripts/compress-team-photos.js:
- Reads
posts/assets/team/*.{jpg,jpeg}, filters to files above a configurable threshold (default 400 KB).
- For each over-threshold file: resize to fit within 800x800, re-encode as JPEG quality 80, preserve original filename + extension.
- Dry-run by default: prints
before → after (saved X%) for each candidate, no writes.
--write flag executes the in-place compression.
- Summary at the end: total before, total after, total saved.
Tooling: sharp is the cleanest choice on Node — already widely used in the Vercel stack. Add as a devDependency.
After human review of dry-run output + a visual smoke test on 2–3 photos at the new resolution, run --write and commit with a chore(assets): compress team photos conventional commit.
Acceptance criteria
Blocks
Blocked by
Parent
#32
Problem
The 11 active team photos in
posts/assets/team/*.{jpg,jpeg}total ~30 MB on disk. 7 of them are above 2 MB, withdamien-robert.jpgat 7.6 MB,mariette-baudras.jpgat 4.4 MB,louis-strauss.jpgat 3.5 MB. These are unoptimised originals at full camera resolution — many multiples of what any web layout actually displays.Migrating them as-is means: paying for 30 MB of Vercel Blob storage forever, pushing all those bytes through bandwidth, and degrading LCP on every page that loads a team member avatar.
Doing this before #36 (push to new store) avoids re-doing the upload.
What to build
posts/scripts/compress-team-photos.js:posts/assets/team/*.{jpg,jpeg}, filters to files above a configurable threshold (default 400 KB).before → after (saved X%)for each candidate, no writes.--writeflag executes the in-place compression.Tooling:
sharpis the cleanest choice on Node — already widely used in the Vercel stack. Add as adevDependency.After human review of dry-run output + a visual smoke test on 2–3 photos at the new resolution, run
--writeand commit with achore(assets): compress team photosconventional commit.Acceptance criteria
posts/scripts/compress-team-photos.jsexists, dry-run by default--writeperforms in-place compressionposts/assets/team/are ≤ 400 KB after compressionposts/assets/team/size reduced by at least 80%Blocks
Blocked by