Object

GalleryItem

An object used in a gallery or mosaic component for displaying an individual image.

Properties

URL
uri
(Required)

The URL of an image to display in a gallery or mosaic.

Image URLs can begin with http://, https://, or bundle://. If the image URL begins with bundle://, the image file must be in the same directory as the document.

Image filenames should be properly encoded as URLs.

See Preparing Image, Video, Audio, Music, and ARKit Assets.

accessibilityCaption
string

A caption that describes the image. The text is used for VoiceOver for iOS and VoiceOver for macOS. If accessibilityCaption is not provided, the caption value is used for VoiceOver for iOS and VoiceOver for macOS.

caption
*

A caption that describes the image. The text is seen when the image is in full screen. This text is also used by VoiceOver for iOS and VoiceOver for macOS, if accessibilityCaption text is not provided. The caption text does not appear in the main article view. To display a caption in the main article view, use the Caption component.

explicitContent
boolean

A Boolean value that indicates the image may contain explicit content.

Discussion

Use an array of GalleryItem objects to define the individual items used in a gallery or mosaic component. When the user taps an image in a gallery or mosaic to see it full-screen When the user taps an image in a gallery or mosaic to see it full-screen (as shown in the following figure), the caption from the caption descriptor property is shown. Note that this is different from the Caption component.

This object can be used in Gallery and Mosaic.

Example

{ "components": [ { "role": "gallery", "items": [ { "URL": "bundle://gallery-01.jpg", "caption": "Thanks to the record drought, mountain lions have begun to descend from the peaks, sometimes into urban settings." }, { "URL": "bundle://gallery-02.jpg", "caption": "Coyotes are also seen in cities more often." }, { "URL": "bundle://gallery-03.jpg", "explicitContent": true } ] } ]}

See Also

Galleries and Mosaics

object Gallery

The component for displaying a sequence of images in a specific order as a horizontal strip.

object Mosaic

The component for displaying a set of images as tiles in no particular order.