Formatting
Aspect Ratio
The following image ratios can be set up in accordance with the responsive grid: 32:9, 16:9, 3:2, 4:3, 1:1, 3:4, 2:3.
Modifiers
Captions
With the optional caption added to the Image component, an image can include a caption beneath to provide additional context. This caption should use Label/Small/Regular.
Border
A 1px inside border can be added to the Image component to help frame images. This is useful when the page background and image background are the same or similar colors. For image border color, use outline-variant.
Border Radius
A 32px border radius can be added to the Image component as a visual element.
Content Guidance
Image is a foundational component and does not contain any additional content. Image with caption provides the opportunity for additional content, as shown in the following table.
Element | Content Type | Recommended Character Limit |
---|---|---|
Caption (optional) | Text | 40 |
Media | Image | – |
Accessibility
Alt Tags
- If the image does not provide information essential to understanding the content, use an empty alternative (alt="").
- If the image provides information essential to understanding the content, fill in the alternative with the necessary information (alt="@alternative").
There are several types of images categorized by how to provide appropriate text alternatives. Images must have text alternatives that describe the information or function represented by them in order to be accessible to those with disabilities.
Use the WCAG Alt Decision Tree to decide how to use the alt attribute of the <img> element in various situations.