This element displays an image loaded from a file. It can load the common pixel graphic formats and SVG.
![]() |
|
The <image> element can read SVG images, but will render them as pixel graphics. If you want to get good scaling results or even SVG scripting, then use the <canvas> element instead. |
Name | Type | Default Value | Description |
---|---|---|---|
image-width | unit | The width of the image. The image will be scaled accordingly. | |
image-height | unit | The height of the image. The image will be scaled accordingly. | |
opacity | float | 1.0 | [new in 0.34.3] A floating point value greater than or equal to 0.0 and less than or equal to 1.0. 0.0 corresponds to invisible and 1.0 corresponds to fully opaque. |
scale | float | 1.0 | A decimal value greater than 0 for the scaling factor of the image. A factor of 1.0 yields the original size. |
uri | URI | The path of an image file in a supported file format. |
![]() |
|
Use image-width or image-height alone to preserve the aspect ratio while scaling the image. |
... <image uri="http://gdesklets.gnomedesktop.org/" scale="2.5"/> ...