Productivity
baoyu-compress-image avatar

baoyu-compress-image

Intelligent image compression and conversion utility using best-available local tools like cwebp, ImageMagick, and Sharp.

Introduction

The baoyu-compress-image skill is a highly efficient, automated image optimization tool designed for developers and content creators who need to balance image quality with file size reduction. By leveraging a prioritized chain of local processing engines including sips, cwebp, ImageMagick, and Sharp, it intelligently selects the optimal method for each task to ensure the best possible compression ratio without manual engine management.

  • Automatically selects the most efficient compression engine based on available system tools.

  • Supports WebP as a high-performance default, while providing options for PNG and JPEG formats.

  • Enables bulk optimization through recursive directory processing.

  • Provides flexible configuration via the EXTEND.md system, allowing per-project or per-user quality and format defaults.

  • Outputs clear performance metrics including file size reduction percentages.

  • Target users: Web developers, technical writers, and content managers optimizing assets for performance.

  • Inputs: Accepts individual file paths or entire directories for bulk processing.

  • Outputs: Compressed files saved in-place or at custom paths; optionally outputs machine-readable JSON for CI/CD integration.

  • Usage: Ideal for scripts requiring fast optimization such as 'convert to webp', 'reduce image file size', or 'optimize image' workflows.

  • Constraint: Requires a Bun environment to orchestrate the CLI. Users can customize behavior using --quality 0-100 or --keep-original flags.

Repository Stats

Stars
16,698
Forks
1,944
Open Issues
1
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
Apr 29, 2026, 01:15 AM
View on GitHub