Start with width: dropping from 640 to 480 px removes almost half the pixels per frame. Then remove frames, crop empty space, lower the palette from 256 to 128 or 64, and turn off dithering for flat graphics. Changing the frame delay shortens the loop but does not shrink each frame.
A GIF can be small or good-looking, but it is hard to make it both at once. The format stores every frame as indexed pixels and compresses each frame with LZW. There is no motion prediction to remove redundancy between frames. That means the file size is mostly a function of four things: how many pixels, how many frames, how many colors, and how much detail the encoder has to preserve.
The order below matters. Changing the palette before changing the width is like tuning the radio before turning on the car.
The rough size formula
Think of it as:
size ≈ width × height × frames × bits per pixel × compression factor
The exact number depends on the content and the encoder, but the direction is reliable. Doubling the width quadruples the pixel count. Adding frames adds roughly linearly. A noisier image compresses worse than a flat one.
1. Width is the biggest lever
The pixel count grows with the square of the width. Going from 640 to 480 px keeps 56% of the pixels per frame; going from 640 to 320 keeps 25%.
In a headless Chromium test on this machine, eight frames of a detailed 1600×1067 photo produced:
| Output | Pixels per frame | GIF size |
|---|---|---|
| 640×427 | 273,280 | 1,863 KB |
| 480×320 | 153,600 | 1,087 KB |
| 320×213 | 68,160 | 508 KB |
That is one photo on one machine with 255 colors and Floyd–Steinberg dithering. Your result will differ, but the ratio is the point: the 480 px version is about 58% of the 640 px file, and the 320 px version is about 27%.
For photos, 480–640 px is usually the right range. Use 320 px for chat stickers and small embeds. Go above 640 only when the GIF will be displayed large and the size is acceptable.
2. Frame count is the next lever
Each frame is stored. Removing frames removes pixels. The hard part is keeping the motion readable.
- Remove duplicate or near-duplicate frames.
- Cut the beginning and end if they do not add information.
- For a slideshow, try five frames instead of ten.
- For a loop, make the last frame close to the first so the reset is less noticeable.
The converter accepts up to 30 frames, but 5–15 is a better target for photos. The photo GIF guide covers frame selection in more detail.
3. Crop and fit
A 640×640 canvas full of empty background still costs 640×640 pixels per frame. If the subject occupies a small part of the frame, cropping tighter reduces the canvas and the file.
The converter offers two fitting modes:
- Contain keeps the whole image and adds bars. The bars are part of the canvas, so they still cost pixels, though flat bars compress well.
- Cover fills the canvas and crops the overflow. It removes empty edges but can cut off the subject.
If the source images have very different aspect ratios, cropping them to a common ratio before import gives you more control than letting the converter choose.
4. Lower the palette
GIF allows up to 256 colors per frame. For photos, the encoder’s auto mode uses 256 and dithering. For flat graphics, it uses 128 and no dithering.
Lowering to 128 or 64 colors can reduce the file, especially on images with large flat areas. On a detailed photo, the size gain is smaller and the quality loss is more visible. Test 256, 128, and 64 on the actual image rather than assuming fewer colors always looks worse.
A transparent GIF reserves one palette entry for the transparent index, leaving at most 255 opaque colors. That is a format constraint, not a setting.
5. Dithering: quality versus entropy
Dithering spreads quantization error across neighboring pixels. It makes gradients look smoother, but the pattern is noise, and noise compresses worse than flat areas. Turning dithering off can shrink a GIF, especially on flat graphics.
The trade-off is content-dependent:
- Flat logo, sticker, or UI graphic: no dithering. Solid areas stay solid.
- Photo with sky, skin, or gradients: dithering usually looks better. Try both and compare at normal viewing size, not zoomed in.
The converter’s quality setting controls this. Auto picks dithering for photo-like images and no dithering for flat graphics.
6. Background and transparency
A flat background can compress well because large areas repeat. Transparency can help when the subject is small and the surrounding area is identical across frames, but it is not a guaranteed size win: the encoder still stores the transparent pixels, and the palette has to reserve an index.
If the GIF will sit on a known background, flattening the image onto that color often gives a cleaner edge and a more predictable file. The transparent GIF guide explains the edge cases.
7. Delay does not shrink each frame
Changing the frame delay changes how long each frame is displayed. It does not change the number of pixels stored. A 500 ms frame and a 1000 ms frame with the same image have essentially the same encoded size.
Delay matters for a different reason: a platform may limit the total duration or the number of loops. If you need a shorter clip, remove frames rather than shortening the delay to an unreadable value.
A practical order
- Set the width to 480 or 640 px.
- Remove frames until the sequence still reads.
- Crop or choose cover to remove empty edges.
- Lower the palette to 128 or 64 if the content allows it.
- Turn off dithering for flat graphics.
- Choose a flat background if the destination has one.
- Check the result in the target app, not just the preview.
If the GIF is still too large, the honest answer may be that GIF is the wrong format. Animated WebP is often smaller for photos; a video is better for longer sequences. The GIF vs WebP vs APNG guide explains when switching is worth the compatibility cost.
The converter shows the output size after each attempt, so you can compare settings without guessing.
Sources
Related guides
image-to-gif.com converts images to GIF in the browser; files are never uploaded.
FAQ
Why is my GIF so large?
GIF stores each frame separately and has no inter-frame prediction. A photo also needs a large palette and often dithering. Width, frame count, and color complexity are the main drivers.
Does reducing colors make a GIF smaller?
Usually. A 128-color palette gives the encoder fewer entries to store and can make the index data more repetitive. The effect is smaller on flat graphics than on photos.
Does a longer frame delay make the file smaller?
Not per frame. The delay changes playback timing, not the pixels stored in each frame. A shorter loop can feel smaller because there are fewer frames, but the delay value itself has a negligible effect.
Should I turn off dithering to save space?
For flat graphics, yes. For photos, turning it off can create visible bands. Test both: dithering adds noise and can increase file size, but the quality trade-off may be worse than the size gain.
Is WebP always smaller than GIF?
Often, but not always. A short, flat-color GIF can be small. Animated WebP usually wins for photographic content, but the destination has to support it.