AI Agent Hub
Back to skills
Professional Image Compression Tool icon

Professional Image Compression Tool

Design & Media Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_0bd8e437/zaq272.

About this skill

Problem

Image delivery often gets stuck between two constraints: visible quality and file size. Manually tuning quality, checking each output, and repeating the process across folders makes the workflow hard to reproduce. image-compression-zaq turns these trade-offs into a parameterized compression pipeline.

How it works

The skill is built on Python Pillow and focuses on a few practical operations:
- Automatic mode: tests q90/q80/q70/q60/q50, presents a comparison table, and recommends a more stable quality point.
- Target size: uses --target-size with binary search to keep output near a specified KB limit.
- Batch parallelism: handles directories with --batch, --recursive, and --jobs, which fits photo assets and page resources.
- Format and size control: converts among JPEG, PNG, WebP, BMP, and TIFF, and can resize by percentage or fixed dimensions with --resize.
- Structured output: --json emits machine-readable results for scripts, while --info shows dimensions, color mode, and EXIF.

Boundaries

This skill targets common bitmap compression and conversion, not vector graphics or complex image editing. It does not overwrite files by default; batch processing skips existing files by default; and the parallel job count should stay within the CPU core budget. For transparent assets, WebP is usually a better fit than JPEG, while lossless PNG compression can be enabled with --lossless.

Use Cases

  • Before launch, compress a page-image folder to under 200 KB and get a recommended quality.
  • When organizing event assets, convert transparent PNG files to WebP and inspect image info.
  • When scripting screenshot processing, read `--json` compression results and record file sizes.
  • When exporting report images, resize to fixed dimensions and preserve EXIF metadata.

Best For

  • Front-end engineers who need web assets compressed to a target KB size
  • Operations staff who organize event images and keep formats consistent
  • Automation engineers who batch-process screenshots and emit JSON results
  • Design assistants who maintain product galleries and convert to WebP