Lottieto100% private — in your browser
← Learn

How to put a Lottie animation in a GitHub README

GitHub sanitizes README markdown hard: no scripts, no iframes, and even SMIL-animated SVGs get frozen to a static frame. If you want motion in your README, it has to be an animated image.

Use GIF or APNG

Both animate in GitHub-rendered markdown. GIF is the battle-tested default; APNG keeps full color and smooth alpha if your animation has gradients or soft edges. Either way, a transparent background adapts to GitHub's light and dark themes.

Embedding it

Commit the file to your repo and reference it with standard image markdown — ![demo](./assets/demo.gif) — or drag the file into any issue comment and copy the CDN URL GitHub generates. Keep the file lean (short loop, moderate FPS) so your README loads fast for everyone.

Why your animated SVG didn't work

SVGs referenced in READMEs are served through GitHub's sanitizing proxy, which strips animation. It's not your file — it's policy. Convert to GIF or APNG and move on.

Try it now