View Single Post
Old 06-05-2019, 08:28 AM   #73
Queen Fiona
Junior Member
Queen Fiona began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2019
Device: Kindle 3
Quote:
Originally Posted by enterpr1se View Post
Is it normal the svg import image with a smaller width and hight?
I have a photo 1000px x 1511px
But the viewBox will become "0 0 260 400"
and the image size will become width="260" height="400"
Code:
	<svg 
	xmlns="http://www.w3.org/2000/svg"
	height="100%"  width="100%"
	preserveAspectRatio="xMidYMid meet" version="1.1"
	viewBox="0 0 400 264"
	xmlns:xlink="http://www.w3.org/1999/xlink">
	<image width="400" height="264" xlink:href="../Images/ffdl-0.jpg"/>
	</svg>
As seen here, I have this exact same issue. Why are the viewBox and image size tags so much smaller than the actual image? I did a quick scan of the code, and while I couldn't figure out why this is happening, the comments in the code suggest this behaviour is unintended.
Queen Fiona is offline   Reply With Quote