A looping clip at the top of a README or a game page tells people what the project is before they read a word. A screenshot can't show a jump arc or a scrolling camera. The catch is that GIF is a heavy format, and a raw capture pushed through a Video to GIF Converter on default settings can come out several megabytes, which every visitor then downloads just to look at your repo. Here are the settings I worked out on a test clip, with the file size each change produced.

The test footage

I didn't want to use someone else's game, so the clip here is a test recording I rendered from Kenney's Pixel Platformer tiles (CC0, credited at the end): 8 seconds, 1280×720, 30 fps, a small astronaut running, jumping a gap and hopping across two platforms. The MP4 is 195.0 KB. It isn't a real project, just a stand-in with the kind of footage a lot of small games put in their README: flat colours, pixel art, a scrolling camera.

Pick 3 to 5 seconds, not the whole run

I opened the file in the Video to GIF Converter. It runs in the browser, so a build you haven't released yet stays on your machine. It takes MP4, MOV and WebM files up to 500 MB.

The first 5 seconds are selected by default. I typed Start 2 and End 6, which covers the drop off the first platform, the jump over the gap and the second platform. You can also drag the handles on the timeline, nudge the playhead in 1/30-second steps and hit "Set start" / "Set end" where you want them.

Four seconds is plenty for a preview. It will loop for as long as someone stays on the page, so pick a moment that reads well on repeat, ideally one where the last frame isn't too far from the first. And every extra second at 15 fps is fifteen more full pictures in the file.

Pick a width that divides your resolution

This is the pixel-art part. My recording is 1280 wide, so I set GIF width to 640, exactly half. Every 4×4 block of art pixels in the recording becomes a clean 2×2 block in the GIF.

The default width is 480. That's a scale of 0.375, so art pixels can't all come out the same size: some end up one pixel wide and their neighbours two. I exported a 480-wide version too, and it was smaller, 497.0 KB against 649.6 KB. For pixel art I kept 640 and the even pixels.

If your game renders at 960×540, 480 is exactly half. If it renders at 1920×1080, try 640 (a third) or 960 (half). Do the division before you touch the width box.

Frame rate, quality and colours

I changed one setting at a time and noted the file size. The base version was 640 wide, 15 fps, Quality "Fast" and 256 colours: 649.6 KB, 60 frames.

  • Frames per second. 15 is the default and looked smooth for a platformer. At 10 fps the file dropped to 420.1 KB (40 frames instead of 60), but the run looked clearly choppier. I stayed at 15.
  • Quality. "High" is the page's default and builds a palette for every frame to keep gradients smooth. "Fast" uses one palette for the whole GIF, and the page says it suits flat colours. Pixel-art tiles have no gradients to protect, and "High" came out at about 1.4 MB, more than twice the size. "Fast" it is.
  • Color detail goes from 256 down to 128, 64 and 32. At 64 the file was 432.2 KB, and I couldn't see any banding on the flat pixel art. If you're tight on space, try this before cutting frames.

Video to GIF Converter with a pixel-art gameplay clip trimmed to 2 to 6 seconds, GIF width 640, 15 fps and Fast quality, showing 640 by 360 px and 195.0 KB to 649.6 KB

The 2–6 second range at 640 px, 15 fps and Fast quality: 640 × 360, 195.0 KB in, 649.6 KB out.

The size target is a safety net

Under File size target there are presets for 10 MB, 8 MB and 5 MB, plus Custom, where you type a maximum in KB. The presets are aimed at chat apps. A README or a game page has no fixed number to hit, so it comes down to how much you're willing to make every visitor download, and Custom lets you write that number down. In the test run I had it at 3800 KB.

For this clip it never came into play: four seconds at 640 wide came out at 649.6 KB. I still leave a target set as a backstop for a longer clip or a busier scene. According to the page, when a target kicks in, the converter lowers the frame rate and width step by step until the file fits. So if it does kick in for you, check which width it picked, because a width that no longer divides your resolution brings back the uneven pixels from earlier.

Leave Loop on, press Apply, check the size on the Processed result tab, then Download GIF.

Looping GIF of a pink pixel-art astronaut jumping a gap and crossing floating platforms in a desert level

The finished loop: 4 seconds, 640×360, 15 fps, 649.6 KB.

Putting it in the README

Commit the GIF next to your docs, for example as docs/preview.gif, and reference it with a relative path:

![Astronaut jumping a gap in the test level](docs/preview.gif) 

If you want it displayed narrower than its real width, use an HTML tag instead. Keep the display width a clean fraction of the export, such as 320 for a 640-wide GIF, so the pixels stay even:

<img src="docs/preview.gif" width="320" alt="Astronaut jumping a gap in the test level"> 

Displaying it smaller doesn't make the download smaller. The file size is fixed by the width and frames you exported, which is why the work happens in the converter and not in the Markdown.

Two habits help keep the repo light. Settle on the final version before committing, because every version of a binary file you commit stays in the Git history even after you replace it. And write the settings down (range, width, fps, quality, colours) somewhere in the repo, so the next preview after a big update matches the old one without another round of testing.

The same file works on a game page on your own site or a storefront. Check what that page accepts before you upload.

A few extras

  • Crop before conversion (Left, Top, Width, Height) is worth it if you recorded a window and caught the title bar or a strip of desktop. Trim it here instead of re-recording.
  • Playback speed (0.25× to 4×) is handy for one specific move. Slowing a tricky jump to 0.5× shows the timing, but it doubles the length, so cut the range shorter.
  • Other formats. "Save as" also offers WebP, APNG and MP4. The page notes that animated WebP and MP4 come out much smaller than a GIF of the same clip, so use them where the page you're posting to accepts them. Where you're not sure, GIF is the safe choice.

That's the whole recipe: a short range that loops well, a width that divides your resolution, 15 fps, "Fast" quality for flat colours, fewer colours if you need the room, and a custom size target as a backstop. What width and frame rate do you use for your project GIFs?

Test footage art: Pixel Platformer by Kenney, CC0.