GIF over 10 MB? GitHub will not attach it
GitHub attaches images and GIFs up to 10 MB and silently drops anything heavier. Drop the GIF here; colours, frame rate and size step down until it fits.
Target size
Settings step down until the file drops under the limit.
Colours go first, then frame rate. The picture shrinks only when nothing else is left and you have said yes here.
Pick a file to start.
The GitHub rule
GitHub's documentation on attaching files gives the number: 10 MB for images and GIFs in issues, pull requests, discussions and comments. Video gets 10 MB on free plans and 100 MB on paid ones, and everything else 25 MB. A screen recording saved as a GIF blows through 10 MB quickly, because a GIF keeps every frame as a full picture.
When the file is over the limit, the attachment is refused and the comment box keeps whatever text was there. Nothing is uploaded, so there is nothing to delete.
Getting it under 10 MB
Drop the GIF above with the GitHub target selected. The compressor first cuts the colour count, then the frame rate, and shrinks the picture only if you have allowed it and nothing else is left. Each pass is checked against the 10 MB target, and it stops at the first one that fits. Everything runs in your browser; GitHub still never sees the original.
Screen recordings compress well because large areas do not change between frames. A recording that started at 30 MB usually lands under the limit without losing legibility.
Two alternatives worth knowing
- Convert to MP4. GitHub plays MP4, MOV and WebM inline, and the same recording as an MP4 is several times smaller. The 10 MB free-plan limit still applies to video, but you will be far below it.
- Host it and link. If the GIF has to stay a GIF and still will not fit, press Get a link after converting and paste the Markdown snippet into the comment. The image renders inline and the file is served from here.
Questions
Does the limit apply to README images?
Files committed to the repository follow the repository rules, not the attachment rules. Images uploaded by dragging into an issue or comment are the ones capped at 10 MB.
Will GitHub animate a GIF in a comment?
Yes, an attached GIF plays in issues, pull requests and Markdown files. It is also the only animated format GitHub shows inline besides video.