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

# img

Displays an image.

## Overview

The `img` element contains a link to an image that is to be displayed. This element
is commonly used to display a preview image for a product. Here’s an example of an
`img` element as part of a `lockup` element.

```xml
<lockup>
    <img src="path to images on your server/Car_Movie_250x375_B.png" width="150" height="226" />
    <title>Road</title>
</lockup>
```

### Contained In

- [background](/documentation/TVML/background)
- [lockup](/documentation/TVML/lockup)
- [organizer](/documentation/TVML/organizer)

## Topics

### Valid TVML Styles

[border-radius](/documentation/TVML/border-radius)

Changes the shape of an element’s corner.

[height](/documentation/TVML/element-shaping-height)

Specifies the height of an element.

[margin](/documentation/TVML/margin)

Specifies the spacing around an element.

[tv-placeholder](/documentation/TVML/tv-placeholder)

Sets a default image for an `img` or `monogram` element.

[width](/documentation/TVML/image-attributes-width)

Specifies the maximum width for an image element.

### Valid TVML Attributes

[accessibilityText](/documentation/TVML/accessibilitytext)

Adds hidden text to an element that is used when VoiceOver is enabled.

[aspectFill](/documentation/TVML/aspectfill)

Stretches an image to fill the containing bounding box.

[binding](/documentation/TVML/binding)

Associates information in a data item with an element.

[contentsMode](/documentation/TVML/contentsmode)

Specifies how an image is expanded to fill its containing element.

[height](/documentation/TVML/image-attributes-height)

Specifies the maximum height for an image.

[opaque](/documentation/TVML/opaque)

Indicates whether an image has a transparent background.

[prototype](/documentation/TVML/prototype)

Associates a data item type with an element.

[src](/documentation/TVML/src)

Specifies the URL for an image.

[srcset](/documentation/TVML/srcset)

Specifies multiple URLs for an image.

[width](/documentation/TVML/image-attributes-width)

Specifies the maximum width for an image element.

[theme](/documentation/TVML/theme)

Sets the color scheme for an element.



---

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)