Hook

Post-Edit Image Optimize

Auto-optimize images when written to the repo.

Install

manual
add to ~/.claude/settings.json hooks.PostToolUse

Add this to your Claude Code MCP settings or run via the CLI.

About

PostToolUse hook detecting image writes (PNG/JPG) and running optimization (mozjpeg / oxipng) to keep repo size in check.

Common use cases

  • Keep repo size lean
  • Auto-compress screenshots
  • Image pipeline

Tags

assetsoptimizationautomation