跳转到主要内容
Parameters 5 min read

Controlling GIF File Size: Width, Frame Rate and Color Count

GIF is an ancient format with no inter-frame compression: every frame is stored in full against a 256-color palette. Size is decided by three levers — width, frame rate and color count — and they are not equally effective.

The three levers, ranked by impact

  • Width: area is quadratic. Halving width cuts size roughly 4×. 480 px is plenty for chat; 640 px for web embeds.
  • Frame rate: 10–12 fps reads as smooth for most content; going 30 → 12 fps saves 60%.
  • Colors: 128 colors is visually indistinguishable for most footage; 256 only helps gradients and anime-style content.

Practical size targets

WeChat stickers: under 1 MB (100 MB theoretical cap is never reached in practice). Forum avatars: under 2 MB. Web pages: keep GIFs under 3–5 MB or switch to video (MP4/WebM) which is 5–10× smaller for the same content.

Frequently asked questions