<image> tag with only width will not render
When rendering on the web, if I have a CSV with an image tag that only has the width set, the height will fill according to aspect ratio. When using the androidSVG library, the
example: <image id="photo" xlink:href="data:image/png;base64,someimage" width="107" y="11.5" x="12" clip-path="url(#clip)"/>
Currently AndroidSVG only officially supports SVG 1.1. In that version of SVG, width or height will default to 0 when not specified. And, per the spec, a value of 0 disabled rendering.
In SVG 2, which the browsers support most of now, width and height default to auto. In SVG terms that equates to "100%". That's why you are seeing different behaviour in the browser, compared with AndroidSVG.
I will gradually be implementing SVG2 spec features. So I will mark this issue as a feature request for the new SVG2 geometry attribute behaviour.
Thanks for the report.
Hey great, thanks for the quick response!
So would I be able to put "100%" for height and have that render properly?
Yes. Setting height to "100%" should have the same effect.
Lovely. Thank you for the library!