To convert JPEG to WebP, run `npx optimo photo.jpg --format webp`. WebP often reduces JPEG size at similar perceived 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 webp
```

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

## Why convert?

- WebP often reduces JPEG size at similar perceived quality.
- A good upgrade when you control delivery and want smaller 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)

**WebP**  
Modern image format with great compression and broad browser support.

[Optimize WebP](/content/optimize/webp/index.html) [Compress WebP](/content/compress/webp/index.html) [Resize WebP](/content/resize/webp/index.html) [WebP guide](/content/formats/webp/index.html)

## Not sure which to use?

If you're choosing a delivery format, here's a quick comparison.

[JPEG vs WebP](/content/compare/jpeg-vs-webp/index.html)
