## Command

Convert a file by targeting the output format:

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

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

## Why convert?

- GIF is still used for very simple animations and legacy constraints.
- Useful when you need the GIF container for a specific workflow.

## 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)

### 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)
