GIF and animation guides

Keep animation delays and transparency when converting GIF to WebP

·

A four-frame GIF needs to become a WebP asset without losing its transparent margins or its pauses between frames. Export the displayed frames and check the resulting animation over a different background.

GIF to WebP

Convert a four-frame GIF

Open GIF to WebP and select Load example. The GIF is 64 × 40 pixels with four frames and a total stored delay of 460 ms.

Select Convert to WebP and Play WebP preview. The moving blocks retain their transparent margins. Each WebP frame describes the complete canvas after the GIF's disposal and carry-over rules are applied.

ToolMellow four-frame practice GIFImageMagick examples for coalescing animation frames

Check the last delay and the repeat behavior

Download gif-utility-sample.webp and open it in a viewer that supports animated WebP. It should play three times. The second frame holds for 110 ms and the last frame for 80 ms in the exported timeline.

The GIF's repeat extension asks for two repeats after the first play. Animated WebP stores the three total plays directly. An infinite GIF loop maps to WebP's zero loop count.

ToolMellow four-frame practice GIFRFC 9649 WebP animated container and frame duration

Compare bytes and view the transparent edges

The result shows the WebP size alongside the source size. Lossless full frames can use more space than a GIF that stores small patches, so compare both numbers in the context of your page.

View the WebP over light and dark surfaces to check the alpha edges. A still GIF exports as a single lossless WebP image.

RFC 9649 WebP animated container and frame duration

Common questions

Can WebP contain the same number of plays as every GIF?

WebP supports up to 65,535 total finite plays. A GIF that requests 65,536 total plays exceeds this range, so the converter reports the mismatch.

Why might very short frames look different in a viewer?

The output keeps the stored frame duration. Viewers can choose a different effective delay for frames whose value is zero or very short.

Sources

Put it into practice.

Related guides