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.

- [Optimize JPEG](/content/optimize/jpeg/index.html)  
- [Compress JPEG](/content/compress/jpeg/index.html)  
- [Resize JPEG](/content/resize/jpeg/index.html)  
- [JPEG guide](/content/formats/jpeg/index.html)

**JPEG XL**  
Next-gen image format designed for high quality and efficient compression.

- [Optimize JPEG XL](/content/optimize/jxl/index.html)  
- [Compress JPEG XL](/content/compress/jxl/index.html)  
- [Resize JPEG XL](/content/resize/jxl/index.html)  
- [JPEG XL guide](/content/formats/jxl/index.html)
