To convert JPEG to JPEG XL, run npx optimo photo.jpg --format jxl. JPEG XL can improve compression while keeping high visual quality. Optimo handles format conversion and optimization in a single step.
Command
Convert a file by targeting the output format:
npx optimo photo.jpg --format jxl
Tip: add --dry-run to preview changes.
Why convert?
- JPEG XL can improve compression while keeping high visual quality.
- Useful when you want a high-quality master before creating web files.
Format notes
JPEG
The classic photo format: widely supported, good quality-to-size for photographs.
JPEG XL
Next-gen image format designed for high quality and efficient compression.