Skip to content

feat: convert all images to WebP with pre-commit optimization hook#90

Merged
tomarra merged 4 commits into
mainfrom
feature/image-optimization
Jun 22, 2026
Merged

feat: convert all images to WebP with pre-commit optimization hook#90
tomarra merged 4 commits into
mainfrom
feature/image-optimization

Conversation

@tomarra

@tomarra tomarra commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Converts all 63 images (JPG/JPEG/PNG) to WebP — 63 MB → 23 MB (63% reduction)
  • Updates every image reference in _posts/, _pages/about.md, and _config.yml
  • Adds a pre-commit git hook that automatically converts any newly staged JPG/JPEG/PNG to WebP before it lands in a commit
  • Adds scripts/optimize-images.sh for manual bulk conversion and scripts/install-hooks.sh for one-time hook setup
  • Adds CLAUDE.md documenting the image workflow

Going forward

After cloning fresh, run once:

./scripts/install-hooks.sh

Then just drop images into images/posts/ in any format, git add them, and the hook handles conversion automatically. Reference them as .webp in post front matter and markdown.

Test plan

  • Verify site builds locally with bundle exec jekyll serve and all post images render
  • Stage a new .jpg file, commit, confirm hook converts it to .webp
  • Confirm no .jpg/.jpeg/.png files remain in images/

🤖 Generated with Claude Code

tomarra and others added 4 commits June 22, 2026 11:20
- Convert all 63 images from JPG/JPEG/PNG to WebP (63 MB → 23 MB, 63% reduction)
- Update every image reference in posts, pages, and _config.yml to .webp
- Add .githooks/pre-commit that auto-converts staged images on commit
- Add scripts/optimize-images.sh for bulk conversion and scripts/install-hooks.sh for setup
- Add CLAUDE.md documenting the image workflow and local setup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tomarra tomarra merged commit 50b3232 into main Jun 22, 2026
7 checks passed
@tomarra tomarra deleted the feature/image-optimization branch June 22, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant