From nano-banana-pro
Optimize image size for GitHub, Slack, web, or custom constraints
npx claudepluginhub fakoli/fakoli-plugins --plugin nano-banana-pro# Optimize Image Command Reduce image file size for GitHub, Slack, web, or other constrained environments. ## Prerequisites - Python 3.10+ installed - `uv` package manager installed - macOS uses built-in `sips` (no extra dependencies) - Other platforms use Pillow (installed automatically) ## Presets | Preset | Max Size | Max Width | Use Case | |--------|----------|-----------|----------| | `github` | 500KB | 1280px | README images, PR screenshots | | `slack` | 128KB | 800px | Slack/Discord messages | | `web` | 200KB | 1200px | Blog posts, documentation | | `thumbnail` | 50KB | 400px | ...
Reduce image file size for GitHub, Slack, web, or other constrained environments.
uv package manager installedsips (no extra dependencies)| Preset | Max Size | Max Width | Use Case |
|---|---|---|---|
github | 500KB | 1280px | README images, PR screenshots |
slack | 128KB | 800px | Slack/Discord messages |
web | 200KB | 1200px | Blog posts, documentation |
thumbnail | 50KB | 400px | Previews, icons |
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
<image-path> \
[--preset github|slack|web|thumbnail] \
[--max-size 500KB] \
[--width 800] \
[--out "./optimized.png"]
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./banner.png --preset github
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./screenshot.png --preset slack
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./image.png --max-size 300KB --width 1000
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" \
./large-image.png --preset web --out ./web-ready.png
The command prints the optimized file path and size reduction:
Optimized: ./banner-optimized.png
Size: 2340KB → 420KB (82% reduction)
sips on macOS (built-in) or Pillow on other platforms