Summary
PR #32 added jpegoptim / oxipng / svgo pre-commit hooks (Phase 1) that compress images on commit. They only run on staged files, so the existing ~26 MB of legacy images in images/ stays untouched until each is modified.
A one-shot backfill would shrink the working tree by an estimated 30-60% (mostly from oversized JPGs like kevin.jpg at 3 MB and anne.jpg at 1.7 MB).
Approach
A maintainer runs pre-commit run --all-files (with the image hooks not skipped) and commits the result as a single dedicated PR. Note that .git history blob storage is not reduced — only the working tree and future clones benefit from the smaller files. Full .git reclaim would require git filter-repo and rewriting history, which we explicitly do not do here.
Acceptance
Notes
- Phase 2's size cap will block any image still over 1 MB after compression. Some legacy photos may need editorial downscaling first (e.g.,
kevin.jpg at 3 MB → ~600 KB after jpegoptim --max=85 is still too big; needs to be downscaled to a sane web resolution like 800px wide).
.image-size-overrides is available for files that legitimately need to exceed 1 MB (high-res research figures).
Summary
PR #32 added
jpegoptim/oxipng/svgopre-commit hooks (Phase 1) that compress images on commit. They only run on staged files, so the existing ~26 MB of legacy images inimages/stays untouched until each is modified.A one-shot backfill would shrink the working tree by an estimated 30-60% (mostly from oversized JPGs like
kevin.jpgat 3 MB andanne.jpgat 1.7 MB).Approach
A maintainer runs
pre-commit run --all-files(with the image hooks not skipped) and commits the result as a single dedicated PR. Note that.githistory blob storage is not reduced — only the working tree and future clones benefit from the smaller files. Full.gitreclaim would requiregit filter-repoand rewriting history, which we explicitly do not do here.Acceptance
images/andimages/icons/chore: backfill image compressionPRdu -sh images/measurements before/after in the PR bodyNotes
kevin.jpgat 3 MB → ~600 KB afterjpegoptim --max=85is still too big; needs to be downscaled to a sane web resolution like 800px wide)..image-size-overridesis available for files that legitimately need to exceed 1 MB (high-res research figures).