Skip to main content
Checks for large inline SVGs bloating HTML
Rule IDimages/svg-inline
CategoryImages
ScopePer-page
Severityinfo
Weight3/10

Solution

Large inline SVGs increase HTML size and block rendering. Move SVGs >4KB to external files and reference with <img> or CSS background. Inline small, critical SVGs (icons, logos) only. Use SVGO to optimize. Consider SVG sprites for icon sets. Inline SVGs can’t be cached separately from HTML.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["images/svg-inline"]

Disable all Images rules

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

Enable only this rule

squirrel.toml
[rules]
enable = ["images/svg-inline"]
disable = ["*"]