| Rule ID | perf/animated-content |
| Category | Performance |
| Scope | Per-page |
| Severity | warning |
| Weight | 4/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:| Option | Type | Default | Description |
|---|---|---|---|
gif_size_threshold_kb | unknown | undefined | GIF size threshold in KB above which to suggest video conversion |
Configuration Example
squirrel.toml
Enable / Disable
Disable this rule
squirrel.toml
Disable all Performance rules
squirrel.toml
Enable only this rule
squirrel.toml