Animated favicon setup

Put your PNG frames in a folder named GIFframes, keep them named frame0.png, frame1.png, frame2.png, and so on, then link GIFframes/frame0.png as the favicon and include the JavaScript file.

The only thing most people need to change in the JavaScript is the FPS value. Everything else can stay the same.

Use this code

Copy this file as-is, keep the folder name GIFframes, and only edit the FPS line.

Loading JavaScript...

Page tags

<link rel="icon" href="GIFframes/frame0.png" type="image/png" />
<script src="ANIMATEDgifFUNCTION.js" defer></script>

GIF to favicon frames

Upload a GIF and this tool will calculate its FPS, count the frames, resize each frame to 32x32, rename them frame0.png, frame1.png, and so on, then package them into a zip file.

Choose a GIF to begin.

Zip contents will be named for the required folder structure: GIFframes/frame0.png, GIFframes/frame1.png, and so on.

check out my other websites and projects on my portfolio site.