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

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

## Syntax

```js
var svgAnimatedPreserveAspectRatio = svgImageElement.preserveAspectRatio;
```

### Value

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

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
