What You Need to Make a GIF from Images
At minimum, you need two or more images in any common format (JPG, PNG, WebP, BMP). The images become individual frames in your animation, played in sequence. Here is what to consider before you start:
- Same dimensions: Ideally, all images should have the same width and height. If they differ, most tools will resize or crop frames to match, which can cause unexpected cropping. Resize your images to a consistent size first for the cleanest result.
- Consistent aspect ratio: If exact pixel dimensions vary slightly, at least keep the same aspect ratio (e.g., all 16:9 or all 1:1). This prevents black bars or stretching.
- Frame order: Name your files sequentially (
frame-01.png,frame-02.png, etc.) so tools can sort them correctly. Most online tools also let you drag to reorder. - Number of frames: More frames = smoother animation but larger file. For a 2-second loop at 10 FPS, you need 20 images. For a simple slideshow, 5–10 images at 2–3 FPS work fine.
- Image complexity: GIF uses a 256-color palette per frame. Photos with gradients produce larger files than flat illustrations. Simple graphics with solid colors compress much better.
Method 1: Online — Convertio GIF Maker
The fastest way to create a GIF from images is with a browser-based tool. No software to install, works on any device.
Step-by-step:
- Go to convertio.com/gif-maker
- Make sure the "From Images" tab is selected
- Click "Choose Images" or drag and drop your image files into the upload area. Supported formats: JPG, PNG, WebP, BMP (up to 50 images, 10 MB each)
- Reorder frames by dragging thumbnails in the strip. The order from left to right becomes the frame sequence in your GIF
- Adjust settings:
- FPS — frames per second (10 is a good default)
- Width — output dimensions in pixels (smaller = smaller file)
- Loop — infinite loop or play once
- Quality — color count (High = 256 colors, Medium = 128, Low = 64)
- Click "Create GIF" and wait for processing
- Download your animated GIF
Why online? No installation, no command line, and you get a live preview before downloading. The GIF Maker processes everything server-side, so it works on phones, tablets, Chromebooks, and older computers.
Method 2: Adobe Photoshop (Timeline)
Photoshop has a built-in timeline for creating frame animations. This method gives you full control over timing, layer effects, and per-frame editing.
Step-by-step:
- Open Photoshop. Go to File → Scripts → Load Files into Stack. Select all your images — each becomes a layer
- Open the Timeline panel: Window → Timeline
- Click "Create Frame Animation" in the Timeline panel
- Open the Timeline panel menu (hamburger icon) and select "Make Frames from Layers"
- Set the delay time for each frame (click the time below each thumbnail). For 10 FPS, set 0.1 seconds. For 5 FPS, set 0.2 seconds
- Set looping to "Forever" (dropdown at bottom-left of Timeline)
- Preview the animation with the Play button
- Export: File → Export → Save for Web (Legacy). Choose GIF, set color count (128 or 256), and adjust dimensions
| Photoshop Setting | Recommended Value | Why |
|---|---|---|
| Colors | 128 | Balances quality and file size for most images |
| Dither | Diffusion, 88% | Smooths color banding in gradients |
| Lossy | 0–5 | Slight lossy compression reduces file size without visible artifacts |
| Width | 480px or less | GIF file size grows quadratically with dimensions |
Method 3: GIMP (Free, Open Source)
GIMP treats each layer as a frame when exporting as GIF. It is completely free and available on Windows, macOS, and Linux.
Step-by-step:
- Open the first image in GIMP: File → Open
- Add the remaining images as layers: File → Open as Layers. Select all images at once
- Reorder layers if needed — the bottom layer is the first frame, the top layer is the last frame
- Optional: Image → Canvas Size or Image → Scale Image to set output dimensions
- Set frame timing by renaming each layer. Add the delay in parentheses, e.g.:
Frame 1 (100ms)for 10 FPSFrame 1 (200ms)for 5 FPSFrame 1 (500ms)for a slow slideshow
- Preview: Filters → Animation → Playback
- Export: File → Export As, name the file with
.gifextension - In the export dialog, check "As animation" and "Loop forever". Set a default frame delay (e.g., 100 ms)
Optimize in GIMP: Before exporting, run Filters → Animation → Optimize (for GIF). This removes unchanged pixels between frames, significantly reducing file size for animations where only part of the image changes.
Method 4: FFmpeg (Command Line)
FFmpeg can create GIFs from a sequence of numbered images in a single command. Best for batch automation, scripting, and headless servers.
Basic command:
ffmpeg -framerate 10 -i frame-%03d.png output.gif
This reads frame-001.png, frame-002.png, etc. and creates a GIF at 10 FPS. The %03d pattern matches three-digit zero-padded numbers.
High-quality with palette optimization:
FFmpeg's default GIF encoder produces mediocre colors. A two-pass approach with a custom palette gives much better results:
# Pass 1: Generate optimal palette
ffmpeg -framerate 10 -i frame-%03d.png \
-vf "scale=480:-1:flags=lanczos,palettegen=max_colors=128" \
palette.png
# Pass 2: Create GIF using the palette
ffmpeg -framerate 10 -i frame-%03d.png -i palette.png \
-lavfi "scale=480:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=bayer" \
output.gif
Using glob pattern (non-sequential filenames):
ffmpeg -framerate 10 -pattern_type glob -i '*.png' output.gif
The -pattern_type glob flag accepts shell glob patterns, which is useful when your files are not sequentially numbered. Note: glob patterns work on Linux and macOS only. On Windows, use the numbered pattern (%03d) instead.
| FFmpeg Flag | What It Does | Example |
|---|---|---|
-framerate | Input FPS (frames per second) | -framerate 10 |
-i | Input pattern or file | -i frame-%03d.png |
scale=W:-1 | Scale width, auto-calculate height | scale=480:-1 |
palettegen | Generate optimal 256-color palette | palettegen=max_colors=128 |
paletteuse | Apply palette with dithering | paletteuse=dither=bayer |
-loop | Loop count (0 = infinite) | -loop 0 |
Method 5: ImageMagick convert Command
ImageMagick's convert (or magick in v7+) command creates GIFs from images with a single line. It is the simplest CLI option when you do not need FFmpeg's advanced filtering.
Basic command:
magick -delay 10 -loop 0 frame-*.png output.gif
The -delay value is in hundredths of a second. -delay 10 = 100 ms per frame = 10 FPS. -delay 20 = 200 ms = 5 FPS. Place -delay before the input files so it applies to each frame as it is read.
With resizing and optimization:
magick -delay 10 -loop 0 \
frame-*.png \
-resize 480x \
-layers Optimize \
-colors 128 \
output.gif
| ImageMagick Flag | What It Does | Example |
|---|---|---|
-delay N | Frame delay in 1/100ths of a second | -delay 10 (10 FPS) |
-loop N | Loop count (0 = infinite) | -loop 0 |
-resize WxH | Scale to width (height auto) | -resize 480x |
-layers Optimize | Remove unchanged pixels between frames | -layers Optimize |
-colors N | Reduce palette to N colors | -colors 128 |
-fuzz N% | Treat similar colors as identical | -fuzz 2% |
ImageMagick v6 vs v7: In version 6, the command is convert. In version 7+, it is magick (or magick convert). If magick is not found, try convert instead. Check your version with magick --version or convert --version.
Method Comparison
| Method | Cost | Skill Level | Batch | Best For |
|---|---|---|---|---|
| Convertio GIF Maker | Free | Beginner | Up to 50 frames | Quick GIFs, any device |
| Photoshop | $22.99/mo | Intermediate | Via Actions | Polished GIFs with effects |
| GIMP | Free | Intermediate | Script-Fu | Free desktop alternative |
| FFmpeg | Free | Advanced | Excellent | Scripting, automation, palette control |
| ImageMagick | Free | Advanced | Excellent | Simple CLI, layer optimization |
Optimal GIF Settings
GIF is an old format with inherent limitations — 256 colors per frame and no inter-frame compression. Getting a good result means working within these constraints:
Frame Rate (FPS)
| FPS | Frame Delay | Use Case | File Size Impact |
|---|---|---|---|
| 2–3 | 333–500 ms | Slideshows, step-by-step tutorials | Smallest |
| 5 | 200 ms | Slow animation, before/after comparisons | Small |
| 10 | 100 ms | General purpose — smooth enough for most uses | Moderate |
| 15–20 | 50–67 ms | Smooth motion, product spins, stop-motion | Large |
| 24–30 | 33–42 ms | Video-like (rarely needed for image-based GIFs) | Very large |
Dimensions
Dimensions have the biggest impact on file size. Doubling the width roughly quadruples the file size because GIF stores per-pixel data for each frame.
- 240px wide: Thumbnails, chat reactions. Tiny files (<500 KB)
- 320px wide: Social media inline, mobile. Good size/quality balance
- 480px wide: Blog posts, tutorials, presentations. The sweet spot for most uses
- 640px wide: High-quality display. File sizes grow significantly
- 800px+ wide: Rarely justified. Consider MP4 or WebP animation instead
Color Count and Dithering
GIF supports a maximum of 256 colors per frame. If your source images have millions of colors (like photos), the encoder must reduce the palette:
- 256 colors: Best quality, largest file. Good for photos and complex illustrations
- 128 colors: Excellent trade-off. Barely visible quality loss for most images
- 64 colors: Noticeable banding in gradients, but much smaller files. Works well for flat graphics, logos, and UI screenshots
- Dithering: Simulates missing colors using pixel patterns. Always enable dithering when reducing colors — it prevents harsh color banding
File Size Optimization Tips
- Reduce dimensions first — this is the single most effective way to shrink a GIF. Scale to 480px or smaller
- Fewer frames: 10 frames at 5 FPS often looks better than 30 frames at 15 FPS, and the file is 3x smaller
- Limit colors: Drop from 256 to 128 — saves 15–30% with minimal visual impact
- Use frame optimization: Tools like
-layers Optimize(ImageMagick) or GIMP's "Optimize for GIF" only store changed pixels between frames - Minimize motion: GIF compresses static areas well. The more pixels change between frames, the larger the file
- Consider the source: Simple graphics with flat colors produce much smaller GIFs than photographs with gradients
Target file sizes: For web use, aim for under 5 MB. For email, under 1 MB. For messaging apps (Slack, Discord, iMessage), under 8 MB. Most platforms compress or reject GIFs that exceed their size limit.