# Command

Convert a file by targeting the output format:

```
npx optimo image.png --format jxl
```

Tip: add `--dry-run` to preview changes.

## Why convert?

- JPEG XL can preserve high fidelity while shrinking some PNGs.
- Useful for modern workflows or archival masters.

## Format notes

### PNG

Lossless image format with sharp edges and great support for transparency.

[Optimize PNG](/content/optimize/png/index.html) [Compress PNG](/content/compress/png/index.html) [Resize PNG](/content/resize/png/index.html) [PNG guide](/content/formats/png/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)
