Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Image Displayer
Link to Figma: tba
Overview
- The Dynamic Image Displayer component shows images on a page.
- It supports different sizing and display strategies.
- Developers can set custom dimensions or let the component auto-size.
- Events allow interactions such as clicks and lifecycle handling.
- Visibility and authorization settings control when and for whom the image is shown.
...
- visibilityPolicySetId – Determines whether the component is displayed based on a policy set. This allows showing the image only to users with specific permissions. Example: "contentViewerPolicy".
Links
- Figma: tba
- Live style guide: tba
Guidelines
Usage
- Bind visual content with
imageUrl(template expressions allowed) and always provide an appropriatealt. - Choose an explicit sizing mode via
resizeImageStrategy: fitToContainerfor aspect-preserving photos/illustrations.useStaticSizewithwidth/heightfor predictable thumbnails.useRealSizefor pixel-accurate assets.fillWholeContentonly when distortion is acceptable.- Control when the component renders with
displayConditions; restrict access withvisibilityPolicySetId.
...
- Provide meaningful
altfor informative images; use emptyalt("") for decorative content. - Use
enableAsHotspotwith localizedguidedTourHotSpotTitleandguidedTourHotSpotDescriptionfor guided tours. - Keep
displayNamedescriptive for authoring clarity (non-user-facing).
Dos & Don’ts
| Do | Don’t | Article setting(s) |
|---|---|---|
Use fitToContainer to preserve aspect ratio for photos/illustrations. | Stretch photos with fillWholeContent unless distortion is intentional. | resizeImageStrategy: "fitToContainer" / "fillWholeContent" |
| Provide concise, descriptive alternative text. | Omit alt or reuse file names like IMG_1234. | alt |
| Keep scrollbars enabled when content may overflow. | Hide scrollbars and clip content users need to see. | disableScrollbar, resizeImageStrategy |
Use useStaticSize with width/height for consistent thumbnails. | Set width/height without the static-size strategy and expect fixed results. | resizeImageStrategy: "useStaticSize", width, height |
| Render only when a valid URL is present. | Show empty/broken placeholders. | displayConditions, imageUrl |
| Make imagery actionable via the click event. | Depend on other surfaces to handle image interactions. | events.ON_IMAGE_CLICK |
| Let content define dimensions when appropriate. | Force sizes outside the component’s tokens. | widthAuto, heightAuto, paddingClass |
| Localize guided tour copy for hotspots. | Ship English-only guidance. | enableAsHotspot, guidedTourHotSpotTitle, guidedTourHotSpotDescription |
Accessibility
- Text alternatives: define
alttext ascordingly. - For interactive images, align
altphrasing with theON_IMAGE_CLICKoutcome (e.g., “Opens larger view”). - Overflow access: set
disableScrollbar: falsewhen content may exceed bounds (e.g., withuseRealSize). - Aspect integrity: prefer
resizeImageStrategy: "fitToContainer"when distortion would harm comprehension. - Localization for guidance: when
enableAsHotspotis true, supply translatedguidedTourHotSpotTitle/guidedTourHotSpotDescription. - Prevent empty graphics from being announced by gating display with
displayConditionswhenimageUrlis missing. - Improve hit comfort on touch by adding
paddingClassaround clickable imagery.