Book a call Free rebuild

GIF

March 21, 2023 Updated November 16, 2026 2 min read

Design glossaryGIF is an image format limited to 256 colors that supports simple animation and transparency. For photos and most animations, WebP, AVIF, or video are smaller.

GIF (Graphics Interchange Format) is one of the oldest image formats on the web. CompuServe introduced it in 1987, and the 1989 revision, GIF89a, added the features it is still known for: animation and a transparent color. Today it is mostly used for short looping animations, memes, and reaction images.

How it works

Each GIF image, or each frame of an animated GIF, uses a palette of at most 256 colors. The pixel data is then compressed with LZW, a lossless method that works well on large areas of flat color.

The palette is the real limitation. A photograph has thousands of colors, so turning it into a GIF means reducing it to 256, which causes banding and speckled dithering. GIF compression is lossless, but the conversion to a small palette is not.

  • Transparency is all or nothing: one palette color can be marked fully transparent, with no partial transparency. That is why transparent GIFs often have a jagged or haloed edge, where PNG can blend smoothly.
  • Animation stores every frame as a separate image with a delay between frames, and can loop forever or a set number of times. There is no video-style compression between frames, so files grow very quickly.

GIFs on a website

An animated GIF of a few seconds can weigh several megabytes, which slows the page and can hurt Largest Contentful Paint when it sits near the top. Better options exist for almost every use:

  • Animations and screen recordings: a short MP4 or WebM video with the autoplay, muted, loop, and playsinline attributes behaves like a GIF at a fraction of the size. Google's Lighthouse flags large GIFs and suggests exactly this.
  • Animated images: animated WebP and AVIF are widely supported and much smaller than GIF.
  • Logos and icons: SVG (see vector image) scales perfectly. Use PNG when a raster file is needed.
  • Photos: JPEG, WebP, or AVIF.

GIF still makes sense where nothing else is accepted, as in some email clients that ignore video, or for a tiny simple animation where the file is already small.

GIFs in WordPress

WordPress makes resized copies of every image you upload, and those copies of an animated GIF usually lose the animation, keeping only the first frame. To keep it moving, insert the full-size image, and resize the GIF to the dimensions you need before uploading so the full-size file is not larger than it needs to be.

Respect visitors who have turned on reduced motion in their system settings. A video can be paused or offered with controls. A GIF cannot be stopped, so avoid long or flashing animations, which can also trigger accessibility problems.

WP Services

WordPress services at revolutionary pricing.

Productized WordPress services, from builds to care, delivered by Seahawk and tracked in one app. For the WordPress lovers.