Hi Ismael, on this particular website I am using the Safe SVG plugin which has over 500,000 installs (https://wordpress.org/plugins/safe-svg/) but there is also the SVG Support plugin which has over 600,000 installs (https://wordpress.org/plugins/svg-support/). Defining the width and height attribute will not render the image unresponsive as it still respects max-width: 100%. PageSpeed Insights is penalizing our website because “Image elements do not have explicit width and height. Set an explicit width and height on image elements to reduce layout shifts and improve CLS.” https://web.dev/optimize-cls/#images-without-dimensions
Thanks Ismael!
Hi Ismael, that is what I have been doing but when they website has hundreds of SVGs it is extremely time-consuming and it makes future editing less intuitive.
Joel