Key facts
- MIME type image/gif; files start with the signature GIF87a or GIF89a.
- Lossless LZW compression of a palette of up to 256 colours per frame; photos get visible banding or dithering.
- GIF89a adds animation with per-frame delays and a single transparent colour (no partial transparency).
- Animated GIFs are often several MB; the same clip as MP4 or WebP is commonly 5-10 times smaller.
How to open a .gif file
Open in Photos or any web browser to see the animation. Edit frames in GIMP (each frame is a layer) or ScreenToGif.
Quick Look (Space in Finder) and Safari play animations; Preview shows the individual frames in its sidebar.
Open in a browser or an image viewer that plays animation. Optimize with gifsicle -O3 --lossy=80 in.gif -o out.gif, or convert with ffmpeg -i in.gif -movflags faststart -pix_fmt yuv420p out.mp4.
Common problems and fixes
- GIF does not animate
- Some viewers and editors show only the first frame, and email clients like Outlook desktop may freeze it. Open it in a browser; if it still does not move, the file has a single frame.
- GIF is too large to upload or slows the page
- Reduce dimensions, frame count and colours with gifsicle, or convert it to MP4 or animated WebP and embed it as a looping, muted video.
- Colours look banded or grainy
- GIF can only use 256 colours per frame. Use PNG for static images or MP4/WebP for animation when you need smooth gradients.
- Jagged edges around transparent areas
- GIF supports only on/off transparency, so anti-aliased edges get a halo. Use PNG or WebP, or export the GIF with a matte colour matching the background.
Often converted to or from: MP4, WebP, PNG, APNG