---
title: SVGImageElement.width
slug: Web/API/SVGImageElement/width
tags:
  - API
  - Image
  - NeedsExample
  - Property
  - Reference
  - SVG
  - SVG DOM
  - SVGImageElement
  - width
browser-compat: api.SVGImageElement.width
---
{{APIRef("SVG")}}

The **`width`** read-only property of the
{{domxref("SVGImageElement")}} interface returns an {{domxref("SVGAnimatedLength")}}
corresponding to the {{SVGAttr("width")}} attribute of the given {{SVGElement("image")}}
element.

## Syntax

```js
var width = svgImageElement.width;
```

### Value

An {{domxref("SVGAnimatedLength")}}.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
