rectと同じアスペクト比の画像で機能します:http://jsfiddle.net/M24gX/
<svg width="8cm" height="8cm" version="1.1">
<rect x="0" y="0" width="150px" height="150px" fill="red"/>
<image xlink:href="http://lorempixel.com/150/150/sports/"
x="0" y="0" height="150px" width="150px"/>
</svg>
rectとはアスペクト比が異なる画像では機能しません:http://jsfiddle.net/5v9bd/
<svg width="8cm" height="8cm" version="1.1">
<rect x="0" y="0" width="150px" height="150px" fill="red"/>
<image xlink:href="http://lorempixel.com/300/150/sports/"
x="0" y="0" height="150px" width="150px"/>
</svg>
アスペクト比に関係なく、画像を長方形の150x150px全体に塗りつぶしたい場合は、次のようにします。
- height="150px"とwidth="150px"を割り当てます(すでに行ったように)
- 画像のスケーリングが不均一になるようにpreserveAspectRatio="none"を割り当てます
例: http: //jsfiddle.net/Fq96J/
<svg width="8cm" height="8cm" version="1.1">
<rect x="0" y="0" width="150px" height="150px" fill="red"/>
<image xlink:href="http://lorempixel.com/300/150/sports/"
x="0" y="0" height="150px" width="150px" preserveAspectRatio="none"/>
</svg>
preserveAspectRatioは、SVGを操作するときに必ず知っておくべき属性なので、いくつかのドキュメントを読んで少し試してみることをお勧めします。良い説明はで見つけることができます