blob: 5269b1611f76d465949e68f4f2c26a20e4abe330 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
---
title: <image>
slug: Web/SVG/Element/image
translation_of: Web/SVG/Element/image
---
{{SVGRef}}
L'élément Image SVG (\<image>) permet d'inclure une image matricielle dans un document SVG.
## Contexte d'Utilisation
{{svginfo}}
## Exemple
Rendu basique d'une image PNG dans un objet SVG :
```html
<svg width="100%" height="100%" viewBox="0 0 100 100"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<image xlink:href="/files/2917/fxlogo.png" x="0" y="0" height="100" width="100" />
</svg>
```
{{EmbedLiveSample("Exemple",250,260)}}
## Attributs
### Attributs globaux
- [Attributs de traitement conditionnel](/fr/SVG/Attribute#ConditionalProccessing "en/SVG/Attribute#ConditionalProccessing") »
- [Attributs noyau](/fr/SVG/Attribute#Core "en/SVG/Attribute#Core") »
- [Attributs d'événement graphique](/fr/SVG/Attribute#GraphicalEvent "en/SVG/Attribute#GraphicalEvent") »
- [Attributs Xlink](/fr/SVG/Attribute#XLink "en/SVG/Attribute#XLink") »
- [Attributs de présentation](/fr/SVG/Attribute#Presentation "en/SVG/Attribute#Presentation") »
- {{ SVGAttr("class") }}
- {{ SVGAttr("style") }}
- {{ SVGAttr("externalResourcesRequired") }}
- {{ SVGAttr("transform") }}
### Attributs spécifiques
- {{ SVGAttr("x") }}
- {{ SVGAttr("y") }}
- {{ SVGAttr("width") }}
- {{ SVGAttr("height") }}
- {{ SVGAttr("xlink:href") }}
- {{ SVGAttr("preserveAspectRatio") }}
## Interface DOM
Cet élément implémente l'interface [`SVGImageElement`](/fr/DOM/SVGImageElement "en/DOM/SVGImageElement").
## Compatibilité des navigateurs
{{Compat("svg.elements.image")}}
|