The best GIF settings for Slack, GitHub and email

GIF is a format from 1989 that refuses to retire, because it plays everywhere images do: chat apps, issue trackers, documentation and email. The catch is size. A careless GIF of a 10-second screen recording can be 30 MB. A careful one can be under 2 MB and look just as clear. Here is how to get the careful one.

The four settings that matter

GIF stores each frame as a picture with its own palette of up to 256 colours. File size is roughly frames × pixels per frame, adjusted by how well each frame compresses. So you have four levers:

Duration
Trim ruthlessly. The action you want to show usually fits in 2–6 seconds.
Frame rate
10–15 fps is plenty for interfaces and most actions. GIF delays are stored in hundredths of a second, so 10, 20 and 25 fps are exact, while 15 fps actually plays at about 14.3.
Width
Halving the width cuts the pixels to a quarter. 480 px suits chat; 640–800 px keeps small interface text readable.
Colours
Screen recordings with flat colours often look identical at 64 or 128 colours, at a noticeably smaller size. Video of real scenes needs 256.
DestinationFPSWidthColoursNotes
Slack, Teams, Discord10–12480 px128–256Short loops read best in a busy channel
GitHub issues and PRs10640–800 px64–128GitHub documents a 10 MB limit for images and GIFs
README files8–10640–800 px64–128Keep it small; it loads on every visit to the repo
Email8–10320–480 px128Many email clients show only the first frame of large GIFs

The GitHub figure comes from GitHub Docs, Attaching files. Chat apps change their limits from time to time; if an upload fails, check the app’s help centre.

Recording for a good GIF

  • Record only the part of the screen that matters. A 900 px wide region scaled to 640 px stays sharp; a full 4K screen scaled to 640 px turns text to mush.
  • Move the mouse slowly and pause briefly after each click, so viewers can follow at 10 fps.
  • Use a plain, flat desktop or app theme. Gradients and photos in the background cost colours and bytes.
  • Hide notifications and personal details before you start recording.

Making the GIF

Open your recording in Myriadfile’s video to GIF tool. Play to the start of the action and set the start time, then do the same for the end. Choose fps, width and colours; the estimate updates as you change them. Myriadfile builds a separate optimised palette for each frame, which avoids the washed-out look of a single shared palette. If the result is too big, lower one lever at a time: duration first, then width, then fps, then colours.

When not to use a GIF

For anything longer than about 15 seconds, or with sound, a short MP4 is a better choice: it is often a tenth of the size and looks better. GitHub, Slack and most modern platforms play MP4 inline. Use GIF when you need it to loop silently everywhere, including places that do not play video.

Specification reference: GIF89a specification (W3C).

Tools mentioned