To convert GIF to MP4, run npx optimo animation.gif --format mp4. GIFs are often much larger than video for the same animation. Optimo handles format conversion and optimization in a single step.

Command

Convert a file by targeting the output format:

npx optimo animation.gif --format mp4

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

Why convert?

  • GIFs are often much larger than video for the same animation.
  • MP4 plays smoothly and is broadly compatible on the web.

Format notes

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

Optimize GIF Compress GIF Resize GIF GIF guide

MP4
The most compatible web video container; a safe default for delivery.

Optimize MP4 Compress MP4 Resize MP4 MP4 guide

Not sure which to use?

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

GIF vs MP4