Article

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.

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

Contained In

Topics

Valid TVML Styles

border-radius

Changes the shape of an element's corner.

height

Specifies the height of an element.

margin

Specifies the spacing around an element.

tv-placeholder

Sets a default image for an img or monogram element.

width

Specifies the maximum width for an image element.

Valid TVML Attributes

accessibilityText

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

aspectFill

Stretches an image to fill the containing bounding box.

binding

Associates information in a data item with an element.

contentsMode

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

height

Specifies the maximum height for an image.

opaque

Indicates whether an image has a transparent background.

prototype

Associates a data item type with an element.

src

Specifies the URL for an image.

srcset

Specifies multiple URLs for an image.

width

Specifies the maximum width for an image element.

theme

Sets the color scheme for an element.

See Also

Image Elements

decorationImage

Displays images inside of other elements.

fullscreenImg

Displays an image over an entire element.

heroImg

Displays an image that is usually large and detailed.