php-svg-lib icon indicating copy to clipboard operation
php-svg-lib copied to clipboard

Support instrinsic dimensions for image elements

Open bsweeney opened this issue 3 years ago • 0 comments

If an image element's width/height is set to auto the values should be based on the image's intrinsic width/height. instead, php-svg-lib attempts to use the keyword as-is which can cause string + numeric calculation errors. If the values are omitted entirely php-svg-lib does not attempt to specify a width/height for the image resulting in incorrect placement.

References:

  • https://svgwg.org/svg2-draft/embedded.html
  • https://developer.mozilla.org/en-US/docs/Web/SVG/Element/image

bsweeney avatar Jul 23 '22 16:07 bsweeney