<!--
{
  "documentType" : "article",
  "framework" : "TVML",
  "identifier" : "/documentation/TVML/image-attributes-width",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "width"
}
-->

# width

Specifies the maximum width for an image element.

## Overview

The image is shrunk to fit the bounding box if the image is bigger than the size
specified for the `width` attribute. You must declare either a `width` style or attribute
for an image. Declaring a style overwrites an attribute declaration. Here’s an example
that sets the width for an image to 200 points.

```xml
<img src="resource://mpaa-g" width="200">
```

### Values for width

- Integer: The width of the element, in points.

### Elements that Use width

- [decorationLabel](/documentation/TVML/decorationlabel)
- [fullscreenImg](/documentation/TVML/fullscreenimg)
- [heroImg](/documentation/TVML/heroimg)
- [img](/documentation/TVML/img)

> Note: When an image is a child of a `lockup` element, the longest dimension of
> the image must be 70 points longer than the corresponding bounding box dimension.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)