Back to Svgo

removeDimensions

docs/04-plugins/removeDimensions.mdx

4.0.1579 B
Original Source

Removes the width and height attribute from the top-most <svg> element if specified, and replaces it with the viewBox attribute if it's missing.

:::info

This is effectively the opposite of the removeViewBox plugin, ensure that is disabled before using this one.

:::