baoyu-compress-image

Compress images to webp, png, or jpeg with automatic tool selection.

2|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/augustscl/awesome-xiawang-skills --skill baoyu-compress-image-augustscl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/augustscl/awesome-xiawang-skills/tree/main/baoyu-compress-image
Command: npx skills add https://github.com/augustscl/awesome-xiawang-skills --skill baoyu-compress-image-augustscl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sharp, and includes scripts (resource) components.

What problem does it solve?

Many images consume excessive disk space and bandwidth and require manual, tool-specific workflows to convert and optimize formats for web or archives. This Skill streamlines image size reduction and format conversion with automatic tool detection and consistent quality controls.

Core Features & Use Cases

  • Automatic tool selection: picks the best available compressor (sips, cwebp, ImageMagick, or sharp) based on platform and installed tools.
  • Flexible output & control: supports webp, png, and jpeg outputs with adjustable quality, optional keep-original behavior, recursive directory processing, and JSON summary output.
  • Use Case: batch-convert a project's images to WebP for faster web delivery while preserving originals and generating a summary of total size reduction.

Quick Start

Run the baoyu-compress-image script to convert a local image or folder to optimized webp files at quality 80 while keeping the originals.

Frequently Asked Questions about baoyu-compress-image

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch compress images to WebP for web delivery?

Batch compress images to WebP by processing an entire directory recursively with adjustable quality settings, generating optimized files and a JSON summary of total size reduction for web delivery.

What is the best way to reduce PNG file size without losing the originals?

Reduce PNG file size by applying image compression with a keep-original behavior, which preserves the original files while creating optimized versions with a smaller storage footprint.

Does sharp work with ImageMagick for image compression?

Sharp and ImageMagick are both supported compressors, but the tool automatically selects the best available option between sips, cwebp, ImageMagick, and sharp based on the platform and installed tools.

Can I convert a folder of images to JPEG and output a JSON summary?

Convert a folder of images to JPEG by running recursive directory processing, which outputs a JSON summary detailing the total size reduction alongside the optimized image files.

Do I need to install specific tools for batch image compression to work?

No specific tool installation is required for batch image compression because the process relies on automatic tool detection, picking the best available compressor from sips, cwebp, ImageMagick, or sharp.

What are the limitations of using sharp for recursive image processing?

Sharp is limited to webp, png, and jpeg formats with adjustable quality settings, requiring the dependency to be installed for recursive directory processing and JSON output generation.