Is removeViewBox still the correct default in SVGO v3/v4?
0 reputation · 30 Apr 2020, 05:22 UTC
When upgrading from SVGO v2 to v3 or v4, the configuration schema and plugin defaults shift significantly. The removeViewBox plugin, which strips the viewBox attribute, was enabled by default in v2 but its status has been debated in v3/v4 releases. Projects that rely on intrinsic scaling may experience visual regressions if the viewBox is removed, yet disabling the plugin can increase file size and coupling to width/height attributes.
The core uncertainty is whether keeping removeViewBox enabled continues to provide safe, predictable output across major releases, or if it introduces subtle rendering differences that outweigh its benefits.
Which projects should disable removeViewBox to preserve scaling? Does enabling it break icons that depend on a viewBox for layout? What is the safest approach to decide the default setting when migrating to a newer SVGO major version?