Photos
Stay organized with collections
Save and categorize content based on your preferences.
Shows single or multiple photos, set using the companion app.
Introduced in Wear OS 6
Syntax
<Photos source="string" defaultImageResource="string"
change="TAP | ON_VISIBLE" changeAfterEvery="integer"
width="integer" height="integer">
</Photos>
Attributes
The Photos
element has the following attributes. Some attributes are
required while others are optional.
Required attributes
The following attributes are required:
source
The name of source of the photos. Must correspond to the name used in the id
in the PhotosConfiguration
definition.
For example, if an id
of my_photos
is used in PhotosConfiguration
then use [CONFIGURATION.my_photos]
, as
shown in the following snippet:
<UserConfigurations>
<PhotosConfiguration id="my_photos" configType="SINGLE"/>
</UserConfigurations>
<Scene>
<PartImage ...>
<Photos source="[CONFIGURATION.my_photos]"
defaultImageResource="placeholder_photo"/>
</PartImage>
</Scene>
defaultImageResource
The default image to show. Shown if the user has not selected a photo using
the companion app. This has a maximum size of 50 KB.
Optional attributes
The following attributes are optional:
change
A space-separated list of events that cause the photo to be changed. This
applies only when the PhotosConfiguration
specifies multiple images can be
shown. Can include one or more of the following values:
TAP
- when the user taps the photo element.
ON_VISIBLE
- when the photo element becomes visible.
changeAfterEvery
Applies only to the ON_VISIBLE
change
type and specifies after how many
device wake-ups the photo should change. Must be an value between 3 and 10
inclusive.
width
If specified, applies a crop of this width to the photo.
height
If specified, applies a crop of this height to the photo.
Recommended for you
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# Photos\n\nShows single or multiple photos, set using the companion app.\n\nIntroduced in Wear OS 6\n\nSyntax\n------\n\n```xml\n\u003cPhotos source=\"string\" defaultImageResource=\"string\"\n change=\"TAP | ON_VISIBLE\" changeAfterEvery=\"integer\"\n width=\"integer\" height=\"integer\"\u003e\n\u003c/Photos\u003e\n```\n\nAttributes\n----------\n\nThe `Photos` element has the following attributes. Some attributes are\nrequired while others are optional.\n\n### Required attributes\n\nThe following attributes are required:\n\n`source`\n\n: The name of source of the photos. Must correspond to the name used in the `id`\n in the [`PhotosConfiguration`](/reference/wear-os/wff/user-configuration/photos-configuration) definition.\n\n: For example, if an `id` of `my_photos`\n is used in [`PhotosConfiguration`](/reference/wear-os/wff/user-configuration/photos-configuration) then use `[CONFIGURATION.my_photos]`, as\n shown in the following snippet:\n\n \u003cUserConfigurations\u003e\n \u003cPhotosConfiguration id=\"my_photos\" configType=\"SINGLE\"/\u003e\n \u003c/UserConfigurations\u003e\n \u003cScene\u003e\n \u003cPartImage ...\u003e\n \u003cPhotos source=\"[CONFIGURATION.my_photos]\"\n defaultImageResource=\"placeholder_photo\"/\u003e\n \u003c/PartImage\u003e\n \u003c/Scene\u003e\n\n`defaultImageResource`\n\n: The default image to show. Shown if the user has not selected a photo using\n the companion app. This has a maximum size of 50 KB.\n\n### Optional attributes\n\nThe following attributes are optional:\n\n`change`\n\n: A space-separated list of events that cause the photo to be changed. This\n applies only when the `PhotosConfiguration` specifies multiple images can be\n shown. Can include one or more of the following values:\n\n - `TAP` - when the user taps the photo element.\n - `ON_VISIBLE` - when the photo element becomes visible.\n\n`changeAfterEvery`\n\n: Applies only to the `ON_VISIBLE` `change` type and specifies after how many\n device wake-ups the photo should change. Must be an value between 3 and 10\n inclusive.\n\n`width`\n\n: If specified, applies a crop of this width to the photo.\n\n`height`\n\n: If specified, applies a crop of this height to the photo.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Image](/reference/wear-os/wff/v2/group/part/image/image)\n- [Complication](/reference/wear-os/wff/complication/complication)"]]