safe-svg icon indicating copy to clipboard operation
safe-svg copied to clipboard

SVG dimensions broken after 2.2.3

Open R33D3M33R opened this issue 8 months ago • 0 comments

Describe the bug

Dear developers,

after the 2.2.3 version, the dimensions of images are broken. The plugin doesn't seem to detect svg width, height, viewbox dimensions properly anymore, and instead pulls values from the actual drawing (path). This breaks layouts, because for example width and height for a svg image set that was dimensioned using padding are now wrong.

Please look into this as this might affect a lot of people.

Best regards, Andrej

Steps to Reproduce

Example: SVG with <svg width="54.529" height="50.001" version="1.1" viewBox="0 0 54.529 50.001" xmlns="http://www.w3.org/2000/svg"> gets detected as "Dimensions: 46 by 50 pixels", because that is the size of the path inside it. See example for more info:

broken-icon

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

R33D3M33R avatar Jun 18 '24 07:06 R33D3M33R