Skip to main content
Checks for large GIFs that could be converted to video
Rule IDperf/animated-content
CategoryPerformance
ScopePer-page
Severitywarning
Weight4/10

Solution

Convert large animated GIFs to video formats (MP4, WebM) for 50-90% smaller files. Use <video autoplay loop muted playsinline> for GIF-like behavior. Tools: ffmpeg, gif2webm, or Cloudinary can automate conversion. Modern video codecs are far more efficient than GIF for animation.

Options

This rule supports the following configuration options:
OptionTypeDefaultDescription
gif_size_threshold_kbunknownundefinedGIF size threshold in KB above which to suggest video conversion

Configuration Example

squirrel.toml
[rules."perf/animated-content"]
gif_size_threshold_kb = undefined

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["perf/animated-content"]

Disable all Performance rules

squirrel.toml
[rules]
disable = ["perf/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["perf/animated-content"]
disable = ["*"]