/GUIDE
GIF, SVG or text: which one to use
Use a GIF for any piece from the library. It is the only animated image GitHub plays everywhere, including the mobile app. Keep it under about 2 MB so it loads fast: 4 seconds at 720 pixels wide is usually 300 KB to 1.5 MB.
Use an SVG for a name or title banner. The banner maker writes the animation into the file with CSS, which GitHub allows, so it stays a few kilobytes and stays sharp on high density screens.
Use a text block when the README is also shown somewhere that will not load images, like a package registry, a terminal Markdown viewer or a man page.
Making it look right in dark and light mode
About two thirds of GitHub readers use the dark theme. A GIF with a dark background looks like a black rectangle on the light theme, and the reverse looks like a white flash at night.
Export both versions with the two GIF buttons in the builder and wrap them in a picture element. GitHub passes the reader's theme to prefers-color-scheme, so each reader sees the one drawn for their background.
Sizing
GitHub's README column is about 830 pixels wide on desktop. Set the width attribute between 600 and 760 for a hero, or use width="100%" for a banner. On phones the image scales down by itself.
Do not set a height. The image keeps its own proportions.
Where to keep the file
Commit it to the repo, in a folder such as assets or .github. Relative paths like assets/hero.gif work on GitHub, but package registries need the full raw URL: https://raw.githubusercontent.com/owner/repo/main/assets/hero.gif. The npm tab in the builder writes that for you.
Avoid hotlinking images from other sites. They can disappear, and GitHub caches them through its own proxy anyway.
Accessibility
Always write alt text that says what the picture is, for example "Starry Ridge, animated ASCII art". Screen readers read it, and it shows if the image fails to load.
GitHub does not pause GIFs for readers who prefer reduced motion. If your audience includes people who are sensitive to motion, choose a calm piece, or use the PNG or text version instead.