A GIF that stops after one play (or loops when it shouldnβt) has the wrong loop setting. It is stored in a small block in the file (the NETSCAPE2.0 extension):
| In the file | Plays |
|---|---|
| no loop block | once |
| loop count 0 | forever |
| loop count n | n + 1 times |
The β+1β confuses many tools. GIFmeta always talks about how many times the GIF plays, and writes the right value for you.
With the desktop app
- Open the GIF. The status bar shows the current setting:
Loop: βorLoop: 1Γ (once). - Go to βοΈ Settings β Loop.
- Turn on β Loop forever β or turn it off and set Plays to 1, 2, 3β¦
- πΎ Save.
With the command line
# loop forever
gifmeta mod input.gif --infinite -o looping.gif
# play exactly 3 times
gifmeta mod input.gif --loop-count 3 -o three-times.gif
# play once (removes the loop block)
gifmeta mod input.gif --loop-count 1 -o once.gif
See the current setting with gifmeta info input.gif β it prints β infinite, 1Γ (plays once) or 3Γ.
Lossless
Only the loop block changes. Frames, colours and timing stay byte-for-byte the same.
Why does my GIF still loop on some sites?
Some platforms ignore the loop setting and loop every GIF (or convert GIFs to videos). Messaging apps and browsers respect it; social networks often donβt.