Awesome-omni-skill image-optimizer
Optimize and compress images for web use. Reduces file sizes of JPEG, PNG, GIF images using lossy/lossless compression. Can resize images to maximum dimensions, convert to WebP format, and process entire directories recursively. Use when images are too large for web, need compression, or need format conversion.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/content-media/image-optimizer" ~/.claude/skills/diegosouzapw-awesome-omni-skill-image-optimizer && rm -rf "$T"
manifest:
skills/content-media/image-optimizer/SKILL.mdsource content
Image Optimizer
Compress and optimize images for web delivery, similar to Squoosh.
Quick Start
# Ensure dependencies are installed scripts/install-deps.sh # Optimize images scripts/imgopt.sh [OPTIONS] <files or directories>
Common Use Cases
Optimize a single image
scripts/imgopt.sh photo.jpg
Compress all images in a folder
scripts/imgopt.sh images/
Resize and compress for web (recommended for large images)
scripts/imgopt.sh -q 80 -w 1920 images/
Create WebP versions (best compression for modern browsers)
scripts/imgopt.sh --webp images/
Process recursively and keep originals
scripts/imgopt.sh -r --keep --webp ./website/images/
Output to a different directory
scripts/imgopt.sh -o optimized/ *.jpg *.png
Preview what would happen (dry run)
scripts/imgopt.sh -n -r images/
Options Reference
| Option | Description | Default |
|---|---|---|
| Quality level 1-100 | 80 |
| Maximum width in pixels | unlimited |
| Maximum height in pixels | unlimited |
| Output directory | in-place |
| Also create WebP versions | off |
| Keep originals (save as .opt.ext) | off |
| Process directories recursively | off |
| Show what would be done | off |
| Show detailed progress | off |
Supported Formats
- Input: JPEG, PNG, GIF, BMP, TIFF
- Output: Same format (optimized) + optional WebP
Recommended Settings by Use Case
| Use Case | Command |
|---|---|
| Blog images | |
| Hero/banner images | |
| Thumbnails | |
| E-commerce products | |
| Maximum compression | |
Tips
- Always test on copies first - Use
or--keep
until you're happy with results-o output/ - WebP is best for web - Creates files typically 25-35% smaller than optimized JPEG
- Quality 80 is a good default - Below 70 you may notice artifacts
- Resize matters most - A 4000px image resized to 1920px will be much smaller regardless of compression
See references/REFERENCE.md for detailed technical information.