The Working Approach
Baoyu Compress Image wraps an image-compression script with file, directory and output options. WebP is the default output, while PNG and JPEG are also documented choices. The workflow selects an available image tool in a stated order: sips, cwebp, ImageMagick and then Sharp.
The key decision is what happens to the source files. The documented default does not keep originals, while the keep option preserves them. Project and user preferences can also supply format, quality and preservation choices. This makes an explicit output location and original-file policy useful inputs before any batch processing begins.
Expected Deliverables
- Compressed images in the chosen format and destination.
- A reported conversion and size-change result for processed assets.
- Optional structured JSON output for a larger asset workflow.
From Brief to Review
- 01Resolve preferences and scope
Identify the exact file or directory and read applicable EXTEND.md preferences. Specify whether subdirectories are included and whether originals must be preserved.
- 02Choose output settings
Select WebP, PNG or JPEG, an output path and quality. The documented quality default is 80; the appropriate result depends on the image content.
- 03Run the scoped conversion
Use the bundled main.ts script through Bun or the documented fallback. Allow its tool selection to choose an available backend.
- 04Review the resulting assets
Check generated images and reported size changes. Confirm that the chosen preservation and recursion settings were respected.