Image Compression
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @user_13f0f8f8/image-new.
About this skill
The problem
Images often need to be smaller before upload, sharing, or front-end delivery. Saving originals as-is increases storage and loading costs. Adjusting quality, dimensions, and format by hand is repetitive, and batch work can easily lose directory structure. image-compress turns this into a reusable compression flow: it can process a single image, a directory, or files matched by a glob pattern, then display a summary table for verification.
How it works
The skill prepares a Python Pillow-based compression script and runs it with the supplied arguments. Core capabilities include:
- Quality control:
--quality/-qsets output quality from 1 to 100, defaulting to85; lower values generally produce smaller files. - Format conversion: supports
jpeg,png, andwebpoutput, defaulting to the input format. - Dimension limits:
--max-widthand--max-heightconstrain pixel size while preserving aspect ratio. - Batch handling: for directories or
globinput, output defaults to./compressedand preserves the input directory hierarchy. - Lossless option:
--losslessis available forPNGandWebPonly.
Boundaries and notes
The skill relies on a Python environment with Pillow. On some Windows setups, python3 may be a Store stub, while python is the usable command. JPEG output converts RGBA images to RGB. EXIF metadata is preserved unless explicitly stripped, so publish-ready assets should be reviewed separately. Lossless compression does not apply to every input format.
Use Cases
- A front-end engineer compresses directory PNG files into WebP and limits width before upload.
- A data labeling vendor lowers JPEG quality to 85 while keeping EXIF before delivery.
- An operations staff member matches ./images/**/*.png with a glob and outputs to ./compressed.
- A designer losslessly compresses Logo PNG files and checks the resulting file sizes before handoff.
Best For
- Front-end engineers optimizing page performance who need smaller static image assets.
- Operations staff managing product photos who need uniformly sized WebP batches.
- Designers delivering brand assets who need lossless PNG compression and preserved folders.
- Algorithm engineers cleaning datasets who need quality-controlled image compression.
Related Skills
Excalidraw Wrap is an Excalidraw-focused wrapper, with tags for TypeScript, GitHub, and automation.
Calibrate vague brand inputs, expose contradictions, distill a brand core and positioning boundaries, then stress-test the result into an executable brand skeleton.
Generate localized Chinese brand names, naming directions, slogans, and risk checklists with reusable templates and trademark search reminders.
A beginner-friendly photo analysis tool that infers shooting parameters from visual features and suggests post-processing, optimization, and learning keywords.