Performance · Image delivery

Animated GIF instead of video

An animated pattern of shifting orange and purple clouds

The animation on this page is a GIF of almost 1MB. The same clip as an MP4 or WebM video would be a small fraction of the size.

How this page is built

The animation under the heading is a 12 frame GIF, 480 by 270 pixels shown at 320 by 180, weighing about 980KiB. It is near the top of the page so that it loads straight away, and it has fetchpriority="high" so that it is not also reported as a slow largest contentful paint image.

Why it matters

GIF is a very old format. Each frame is stored as a separate image with at most 256 colours and simple compression, so animations quickly grow to megabytes. Video formats store only the changes between frames, so the same clip is usually 80 to 95% smaller.

Large GIFs slow down the page, use visitors’ data and push down Core Web Vitals scores, especially on mobile networks.

How to check it

Run Lighthouse or PageSpeed Insights on the page and look at the diagnostics. Crawl tools that run Lighthouse for each page, or that measure page resources, report the same finding across the site. Lighthouse lists animated GIFs over 100KiB with the estimated saving from converting them to video.

How to fix it

Convert the GIF to MP4 and WebM, then show it with <video autoplay loop muted playsinline> so it behaves like a GIF. Tools such as FFmpeg can do the conversion in one command.

Back to all tests