Doesn't SVG support auto width and height for images? -
in html image element can created without dimensions specified. have intrinsic width , height:
<img src="me.jpg" alt="">
however, in svg image without dimension attributes have 0×0 size, prevent width
, height
must specified (as in example):
<image xlink:href="me.jpg" width="64" height="64" />
can svg image forced take it's original width , height (without adding corresponding attributes, of course)? i'm curios inline svg inside html, if matters.
the svg 1.1 specification requires width
, height
attributes <image> element. browsers today implement that, answer not yet. leaving attributes off means default value of 0
used, has effect of making image invisible.
however, autosizing of images being added svg2, see https://svgwg.org/svg2-draft/struct.html#imageelement. means you'll able want in not distant future.
Comments
Post a Comment