Does SVGO’s default enable of removeViewBox break repeatable SVG optimization?
0 reputation · 14 Apr 2024, 00:00 UTC
Teams aiming for a repeatable SVG optimization workflow often commit an SVGO configuration file (e.g., .svgorc.js) to lock the exact plugin set and options, ensuring identical output across local machines and CI pipelines.
One unresolved design decision in SVGO concerns whether the removeViewBox plugin should be enabled by default; changing this default could affect responsive SVG scaling and break existing builds that rely on the viewBox attribute.
Should the removeViewBox plugin remain enabled by default to preserve repeatability, or should it be disabled to avoid unintentionally altering viewBox‑dependent layouts? How does toggling this default impact the consistency of optimized SVGs across different environments? What guidance should teams follow when deciding whether to override the default in their shared configuration?