# Convert GIF to WebM
To convert GIF to WebM, run `npx optimo animation.gif --format webm`. WebM is usually far smaller than GIF for animated content. Optimo handles format conversion and optimization in a single step.

## Command
Convert a file by targeting the output format:

```
npx optimo animation.gif --format webm
```
Tip: add `--dry-run` to preview changes.

## Why convert?
- WebM is usually far smaller than GIF for animated content.
- Great for web delivery when MP4 isn’t required.

## Format notes
### GIF
Legacy animated image format that is still widely used for simple loops.

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

### WebM
Web-first video format that often compresses well and is common for modern browsers.

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