files/en-us/web/svg/reference/element/image/index.md
The <image> SVG element includes images inside SVG documents. It can display {{glossary("raster image")}} files or other SVG files.
The only image formats SVG software must support are {{glossary("JPEG")}}, {{glossary("PNG")}}, and other SVG files. Animated {{glossary("GIF")}} behavior is undefined.
SVG files displayed with <image> are treated as an image: external resources aren't loaded, {{cssxref(":visited")}} styles aren't applied, and they cannot be interactive. To include dynamic SVG elements, try {{SVGElement("use")}} with an external URL. To include SVG files and run scripts inside them, try {{HTMLElement("object")}} inside of {{SVGElement("foreignObject")}}.
[!NOTE] The HTML spec defines
<image>as a synonym for {{HTMLElement("img")}} while parsing HTML. This specific element and its behavior only apply inside SVG documents or inline SVGs.
{{svginfo}}
0; Animatable: yes0; Animatable: yesauto; Animatable: yesauto; Animatable: yesnone | xMinYMin | xMidYMin | xMaxYMin | xMinYMid | xMidYMid | xMaxYMid | xMinYMax | xMidYMax | xMaxYMax) (meet | slice)?; Default value: xMidYMid meet; Animatable: yesanonymous | use-credentials ]?; Default value: None; Animatable: yesasync | sync | auto; Default value: auto; Animatable: yeshigh
low
auto
This element implements the {{domxref("SVGImageElement")}} interface.
Basic rendering of a PNG image in SVG:
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
<image href="mdn_logo_only_color.png" height="200" width="200" />
</svg>
{{EmbedLiveSample("Example", 250, 260)}}
{{Specifications}}
{{Compat}}