baoyu-compress-image

Compress images to WebP or PNG using sips, cwebp, ImageMagick, or Sharp.

Updated May 1, 2026
One-click install
npx skills add https://github.com/flashfoxer/openclaw-my-skills --skill baoyu-compress-image-flashfoxer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/flashfoxer/openclaw-my-skills/tree/main/baoyu-imagine/baoyu-compress-image
Command: npx skills add https://github.com/flashfoxer/openclaw-my-skills --skill baoyu-compress-image-flashfoxer

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the image compression process, helping you reduce the size of image files while maintaining quality.

Core Features & Use Cases

  • Image Compression: Compress images to WebP or PNG format using the best available tool.
  • Automatic Tool Selection: Selects the most efficient tool for compression (sips, cwebp, ImageMagick, or Sharp).
  • Customization: Allows for customization of output format, quality, and whether to keep the original file.
  • Use Case: Ideal for optimizing images for web use, reducing storage space, or speeding up page load times.

Quick Start

Run the baoyu-compress-image skill with the command: compress-image {input-image} --output {output-path} --format {format} --quality {quality} --keep {keep-original}

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 to WebP or PNG while preserving quality?

To compress images to WebP or PNG while preserving quality, use an automated script that selects the most efficient tool like cwebp or Sharp to reduce file size with customizable output formats and quality levels.

What is the best way to reduce image file size for web page load times?

The best way to reduce image file size for web page load times is automating compression with tools like sips, cwebp, ImageMagick, or Sharp, which automatically select the most efficient method to optimize images.

Do I need bun or npx to run an image compression script?

Yes, you need either bun or npx installed in your environment to execute the image compression script, as these runtime environments are required to process the compression commands.

Can I customize the output format and quality when reducing image file size?

Yes, you can customize the output format and quality when reducing image file size by specifying the desired format, quality level, and whether to keep the original file during the compression process.

How does automatic tool selection work for image optimization?

Automatic tool selection for image optimization works by evaluating available system tools such as sips, cwebp, ImageMagick, or Sharp, and automatically choosing the most efficient one to compress the target image.