Page History
...
- 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: https://www.figma.com/design/yck1tcUXgdQ5aYX6iUAwrO/GE---Astronaut-Design-System?node-id=11613-71930&t=2GNf1jEXqXOrnDUK-1
- Live style guide: https://e1-dev.k8s.myapp.de/live-style-guide/id7/6-image-raster
Guidelines
[NO DATA AVAILABLE]
Accessibility
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.
Sizing & Layout
- Prefer intrinsic sizing when appropriate using
widthAuto/heightAuto. - For fixed dimensions, pair
resizeImageStrategy: "useStaticSize"withwidthand/orheight. - Preserve aspect ratio with
resizeImageStrategy: "fitToContainer"; reserve"fillWholeContent"for deliberate stretch. - Use
paddingClassto add touch/click comfort around interactive images (ON_IMAGE_CLICK). - Manage overflow with
disableScrollbar: keep it false when content may exceed bounds (e.g.,useRealSize).
Interactions & Events
ON_IMAGE_CLICK: open a larger image, navigate, or emit analytics.
Visibility & Authorization
- Enforce role/permission gating with
visibilityPolicySetId. - Suppress empty/broken states with
displayConditions(e.g., require non-emptyimageUrl). - Expose stable hooks for automation via
idanddataTestId.
Content & Localization
- 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 imageryalt – Defines alternative text description for the image. This text is read by screen readers and shown if the image fails to load.