optimize-jpeg
Installation
SKILL.md
Optimize JPEG
Squeeze JPEG file size. Two modes:
- lossless (default) —
jpegoptim --strip-all. Repacks Huffman tables and strips metadata. No re-encode, no quality change. - recompress —
mozjpeg(cjpeg-mozjpeg). Re-encodes with better quantisation tables; 10–15% smaller than libjpeg-turbo for the same SSIM. Quality flag controls trade-off.
When to use
- Web-prep: photo galleries, blog images, anything destined for upload.
- Archive squeeze: lossless mode is the no-regret option for any JPEG-heavy folder.
- Pre-step inside
web-readyorchestrator.
Do not use this skill when:
- Source is PNG → use
optimize-png. - Source is HEIC/RAW/TIFF — pipe through
web-ready(or convert first). - The JPEG is already heavily compressed (<70% quality estimate) — recompress will visibly degrade.