Your demo GIF finishes before reviewers can read it — change the delays, don't re-record
A reviewer opens your pull request, watches the GIF loop twice, and still has not read the toast. The warning was in the recording and in the export. It was on screen, but not for long enough. Re-recording the same click
A reviewer opens your pull request, watches the GIF loop twice, and still has not read the toast. The warning was in the recording and in the export. It was on screen, but not for long enough. Re-recording the same click path more slowly is a miserable fix when the frames you need are already in the file.
I build LoopGIF. The timing rules below come from the GIF89a specification and from a 21-frame test file I encoded myself on 17 November 2026 (Asia/Shanghai) with Pillow 13.0.0, then checked by reading the Delay Time field in each Graphic Control Extension.
A GIF does not have a frame rate. It has per-frame delays.
I fetched the GIF89a specification from the W3C. In the Graphic Control Extension, Delay Time is a 16-bit value. The spec says:
If not 0, this field specifies the number of hundredths (1/100) of a second to wait before continuing with the processing of the Data Stream. The clock starts ticking immediately after the graphic is rendered.
There is no global fps field. Each frame carries its own delay, in whole hundredths of a second. A tooltip can linger while the cursor stays snappy, but only if the encoder wrote it that way; many screen-recording exports instead stamp the same delay on every frame. Hundredths are a coarse grid: 40 ms is delay 4, 60 ms is delay 6, and 66.7 ms — one frame at 15 fps — is not a value the format can store.
“Export at 15 fps†is not a playback-speed control
Fifteen frames per second means 1000/15 ≈ 66.7 ms per frame. I asked Pillow to write that number several ways, then read the file. For a 15-frame clip, a duration of 66 ms, 67 ms, or the floating-point value 1000/15 all produced a Delay Time of 6 hundredths (60 ms) on every frame. The loop lasted 0.900 seconds, which is 16.667 fps, not 15. Passing 70 ms produced delay 7 (70 ms). Those 15 frames lasted 1.050 seconds, or 14.286 fps. In this encoder, the conversion is integer division by ten: 66 and 67 both become 6. Another encoder might round 67 up to 7. Either way, you cannot hit 15 fps exactly, because 100/15 is not an integer.
Re-exporting a recording at a lower frame rate usually means a video filter picking frames off a timeline. Some pictures disappear, and the one frame where a validation message is fully visible is easy to lose. Changing playback speed is different: leave the bitmaps alone, rewrite only the Delay Time values, and every picture stays. A uniform fps stamp also flattens uneven timing.
A file I actually encoded
I built a 21-frame, 360×148 GIF of a fake “API tokens†panel: typing a token, clicking Rotate, a three-frame toast (“Saved. Your API token was rotated.â€), and the aftermath. I wrote delay 4 (40 ms) on the 18 motion frames and delay 6 (60 ms) on the toast frames, and confirmed those values in the file. The header is GIF89a. The first Graphic Control Extension is 21 f9 04 08 04 00 00 00, a Delay Time of 4 as the spec defines it. The loop is 90 hundredths, or 0.90 seconds. The toast is readable for 18 hundredths, or 0.18 seconds.
I saved the same 21 bitmaps with new delays. The file stayed 58,840 bytes each time. A ×0.5 multiplier (delays doubled) wrote 8 and 12 hundredths: the loop lasted 1.80 seconds, and the toast hold stayed one and a half times longer than the motion frames. ×2 wrote 2 and 3 hundredths and lasted 0.45 seconds, still above the usual browser floor.
×4 is the trap. It wrote 1 hundredth on the 18 motion frames and 2 on the toast frames. The file claims 0.24 seconds. If a browser treats a delay of 0 or 1 as about 10 hundredths, those 18 frames play for 1.00 second instead of 0.18, and the loop plays for about 1.86 seconds — slower than the original, not four times faster. A fixed delay of 7 hundredths — the whole-hundredths value just above 66.7 ms — lasted 1.47 seconds and flattened the hold: the toast no longer lingers relative to the typing. Slowing the clip with a multiplier kept the pause on the message. Stamping a single “15 fps-ish†delay did not.
The floor you hit when you try to go faster
GIF89a does not define a minimum useful delay. It only says the field is used “if not 0.â€
Eric Lawrence, in the archived IEInternals post Trivia: Animated GIF Timing on Microsoft Learn, explained the legacy behaviour. Early tools wrote extremely low durations, such as 0 ms, and Internet Explorer delayed any frame of 50 ms or fewer (20 fps) to 100 ms (10 fps). An update in the same post says IE10 Consumer Preview allows a delay as little as 20 ms; anything lower is still delayed to 100 ms for legacy compatibility.
I did not time a browser’s clock myself. I did write the short values into files with Pillow: 0, 1, 2, or 5 ms stored as Delay Time 0; 10 through 19 ms as 1; and 20 ms as 2. Those “faster than 20 ms†settings are the ones IE10 and its successors said they would not honor at face value. Designing for a floor of two hundredths (20 ms), and treating 0 or 1 in a source file as about ten, is the conservative rule. A GIF already at delay 2 often will not speed up: there is no shorter value you can write that a browser will play as shorter.
How to retime a GIF you already have
Start from the existing file. Do not re-record unless a frame is actually missing. If the relative timing is right and the clip is simply too fast or too slow, scale every delay by the same factor so a hold stays a hold. If you want a steady pace, write one fixed delay on every frame instead.
I maintain LoopGIF’s GIF Speed Changer for this. It is free, requires no sign-up, and runs in your browser; the GIF is not uploaded. You can apply a multiplier from ×0.25 to ×4, or set one fixed delay from 20 to 2,000 milliseconds. It accepts a GIF of up to 10 MB and 300 frames, keeps each frame’s own delay when you use a multiplier, and will not write a delay below two hundredths. Delays of 0 or 1 in the source are read as ten, the way browsers play them. If a speed-up hits the floor, the tool reports how many frames were held back, and it shows the length and file size before and after. Those delays came from Pillow and the file bytes, not from this tool.
For a pull-request GIF that flashes a message, start with ×0.5, and go to ×0.25 if the text is still hard to finish. To speed up a sluggish recording whose frames are already at two hundredths, you need fewer frames, not smaller delays.
I build LoopGIF.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.