Back to the blog

A little know-how

GIF, WebP, APNG or video? Choose how it moves.

A practical guide to choosing a format for an animation: where it will play, what it shows, and how large the file may be.

By KeepSimp 5 min read

A rocky coastline with a small house above turquoise water

An animation can be saved as a GIF, an animated WebP, an animated PNG or a short video. They all move, but they differ in where they play, how they treat colour and transparency, and how heavy they are. The right one depends on where the animation is going.

A quick way to choose.

For a web page you control, try animated WebP first, or a video if the animation is long or photographic. For chat apps, email and anywhere you cannot be sure what the other side supports, GIF is the safe choice. For a sticker or artwork with soft, see-through edges, use WebP or APNG.

Then check the destination's rules. Many places accept only certain formats and reject files over a set size. A format is only right if the place it is going will take it.

GIF: plays everywhere, at a price.

GIF is the oldest of the four and works almost anywhere an image can be shown. Each frame holds at most 256 colours, and a pixel is either fully solid or fully clear, so photographs band and soft edges turn hard. Files are large for what they show.

You can make a GIF lighter by using fewer colours, a lower frame rate, a smaller size or a shorter clip. In KeepSimp, the fast encoder stores only what changes between frames, and the gifski option gives each frame its own colours for the smoothest result.

Animated WebP: full colour, far smaller.

Animated WebP keeps full colour and smooth transparency. Google reports that animated GIFs converted to lossy WebP are 64% smaller, and 19% smaller as lossless WebP. Every current browser plays it. Outside browsers support is patchier, so check before sending one to an app or an older device.

Results depend on the content. Flat artwork is often smallest as lossless WebP, and photographs as lossy. KeepSimp tries both on the first frames at Balanced and High quality and keeps whichever is smaller.

APNG: exact colour and soft edges.

An animated PNG stores every pixel exactly, with smooth transparency. That makes it a good fit for stickers and interface artwork. Files are usually larger than WebP. Software that does not know the format shows the first frame as an ordinary PNG, which is a gentle way to fail.

If an exact APNG is too heavy, reducing it to a palette of up to 256 colours, as KeepSimp does at Balanced and Small file quality, often makes it much lighter while keeping soft edges.

Video: smallest for photographs and recordings.

A short, silent MP4 or WebM is usually far smaller than any animated image, because video formats are built to describe motion. In one test with KeepSimp's sample, a 20-frame pan across a photograph, the GIF was 627 KB, the animated WebP 225 KB and the MP4 between 18 and 36 KB depending on the browser that encoded it. Your own files will differ.

Video has limits of its own. An MP4 has no transparency, a video cannot be used where only an image is accepted, and it needs a video player on the page, set to loop, mute and play inline. Use it where you control the page.

Fit the destination.

Services publish limits, and change them. At the time of writing, Discord asks for animated emoji under 256 KB and stickers as 320 by 320 pixel APNG files of at most 512 KB, and Telegram asks for video stickers as WebM files of at most three seconds and 256 KB. Check the service's own page before relying on a figure.

KeepSimp's animation converter has presets for these, each with its source and the date it was checked. Set a file size limit and it lowers quality, then frame rate, then size, measuring the real file each time, and tells you what it changed.

Compare your own animation.

Add your animation, then use Compare formats. KeepSimp converts it to every format your browser can write and lists the real sizes, smallest first. Pause the preview on a frame and drag the slider to see what each format did to the picture.

Keep your original. Converting to a lossy format discards detail that cannot be brought back, and converting a GIF to another format cannot restore colours the GIF never had.

Further reading

Topics: GIF converter · GIF to MP4 · video to GIF · animated WebP · APNG · compress GIF · GIF for Discord

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool