baoyu-compress-image

Compress WebP, PNG, and JPEG images with adjustable quality settings.

10|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/wx-chevalier/Awesome-Agent-Skills --skill baoyu-compress-image-wx-chevalier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/wx-chevalier/Awesome-Agent-Skills/tree/main/baoyu/baoyu-compress-image
Command: npx skills add https://github.com/wx-chevalier/Awesome-Agent-Skills --skill baoyu-compress-image-wx-chevalier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the need to reduce image file sizes for faster loading times and reduced storage, without significant loss of visual quality.

Core Features & Use Cases

  • Automatic Format Selection: Intelligently chooses between WebP, PNG, or JPEG for optimal compression.
  • Quality Control: Allows users to specify the compression quality level.
  • Recursive Directory Processing: Can compress all supported images within a directory and its subdirectories.
  • Use Case: You have a website with many large images. Use this Skill to compress all images in your assets/images folder to improve page load speed.

Quick Start

Use the baoyu-compress-image skill to compress the image file named 'photo.jpg' to WebP format.

Frequently Asked Questions about baoyu-compress-image

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

FAQPage Schema
How do I compress images in a directory recursively to reduce file size?

To compress images recursively, this Skill processes all supported image files within a target directory and its subdirectories, applying adjustable quality settings to reduce file size while preserving visual quality.

What is the best way to convert and optimize images to WebP format?

The best way to optimize images to WebP format is using this Skill, which utilizes cwebp and Sharp tools to automatically select WebP compression with adjustable quality levels for optimal file size reduction.

Can I adjust the compression quality for PNG and JPEG files?

Yes, you can specify the compression quality level for both PNG and JPEG files, allowing you to balance the trade-off between reducing image file size and maintaining visual quality.

Does this image optimization tool work without external dependencies?

This image compression tool operates without external dependencies, utilizing built-in tools like sips, cwebp, ImageMagick, and Sharp to handle WebP, PNG, and JPEG optimization workflows.

When should I use automatic format selection for image compression?

You should use automatic format selection when you need to intelligently choose between WebP, PNG, or JPEG formats to achieve optimal compression and faster loading times across various image assets.