baoyu-compress-image

Compresses images to WebP or PNG using automatic tool selection.

5|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/oldwinter/skills --skill baoyu-compress-image-oldwinter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/oldwinter/skills/tree/main/lenny-skills/marketing-skills/baoyu-compress-image
Command: npx skills add https://github.com/oldwinter/skills --skill baoyu-compress-image-oldwinter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill reduces the file size of images, making them faster to load and easier to share, without significant loss of visual quality.

Core Features & Use Cases

  • Lossless/Lossy Compression: Compresses images to WebP or PNG formats.
  • Automatic Tool Selection: Uses the best available compression tool (sips, cwebp, ImageMagick, Sharp) based on the target format and system.
  • Batch Processing: Can compress all images within a directory, including subdirectories.
  • Use Case: You have a website with many large image files that are slowing down page load times. Use this Skill to compress them all to WebP format, significantly reducing their size and improving website performance.

Quick Start

Compress the image file named 'logo.png' to WebP format with 75% quality.

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 format for website optimization?

To batch compress images to WebP, this Skill recursively processes directories and subdirectories using automatic tool selection like cwebp or sharp, outputting reduced file sizes while preserving visual quality.

Do I need external command-line tools to compress images with this Skill?

Yes, compressing images requires external command-line tools like cwebp, ImageMagick, or the sharp Node.js library, which the Skill automatically selects based on your target format and system environment.

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

The best way to reduce PNG file size is using lossless compression through this Skill, which automatically selects optimal tools like ImageMagick or sips to shrink images without significant visual quality loss.

Can I configure image compression quality settings for WebP output?

Yes, you can configure image compression quality settings for WebP output, specifying exact quality percentages like 75% to balance file size reduction against visual fidelity for web optimization.

Does this image compression tool work with both single files and directories?

Yes, this image compression tool works with both single files and recursive directory processing, allowing you to shrink individual images or batch process entire folders for web optimization.

What is automatic tool selection for image compression and how does it work?

Automatic tool selection for image compression evaluates your target format and system to choose the best available tool among sips, cwebp, ImageMagick, or sharp, ensuring optimal PNG or WebP file size reduction.