Beta Feature
Let us know so we can improve!
tile/image
Shows an image from a source URL, with required alternative text for accessibility and an optional size.
| Name | Required | Lightning Type | Default | Description |
|---|---|---|---|---|
| alt | Yes | lightning__textType | An alternative text that describes the image content for accessibility. Maximum 125 characters; an empty string for decorative images. | |
| size | No | lightning__textType | auto | The size of the image. Valid values include auto, sm, md, lg, or full. |
| src | Yes | lightning__urlType | The absolute or relative image URL, URL-encoded. |
Use an image to display a graphic referenced by a URL, such as a photo, illustration, diagram, or logo.
For a circular profile photo of a user or entity, use tile/avatar instead.
Note
Set src to the image URL and always provide alt text that describes the content for accessibility.
1{
2 "definition": "tile/image",
3 "attributes": {
4 "src": "https://cdn.example.com/photo.jpg",
5 "alt": "Bar chart showing Q3 revenue by region"
6 }
7}Use size to control the image footprint. For a purely decorative image that conveys no information, set alt to an empty string so assistive technologies skip it.
1{
2 "definition": "tile/image",
3 "attributes": {
4 "src": "https://cdn.example.com/banner.jpg",
5 "alt": "",
6 "size": "full"
7 }
8}The src attribute must reference a resource that’s accessible without authentication. To enable access to the resource, add the domain as a trusted URL. For more information, see Use Static Resources in Widgets.
Consider these valid and invalid image types.
Valid image formats include:
Invalid image types include:
image/svg+xmltext/html, text/plain, application/octet-stream, image/bmp, or omitted media typesdata: scheme isn’t supported when used in a link (href) context. To pass URL validation, use the data: scheme by following these guidelines.
Follow the data:<mediatype>;base64,<payload> syntax. The ;base64 flag is mandatory. Plain-text or raw URL-encoded data is rejected.
The decoded leading bytes must match the magic bytes of the declared MIME type. For example, PNG header corresponds to 89 50 4E 47, JPEG header FF D8 FF, GIF header GIF8, or WebP RIFF....WEBP.
Payload must be within an 8 MiB decoded size limit (MAX_DATA_IMAGE_BYTES) to prevent memory amplification attacks.
Unresolved template expressions, such as {!expr} in either the media-type or payload slots aren’t supported.
Use these size values to control the image footprint. The aspect ratio is always preserved. The width is fixed and the height scales to match.
auto (default): Preserves the image’s intrinsic dimensions.sm: Small fixed width for thumbnails and inline graphics.md: Medium fixed width for standalone images within a block of content.lg: Large fixed width for prominent, focal images.full: Fills the parent container’s width, for banners and hero images.Consider these guidelines when working with images.
alt to an empty string only for decorative, redundant, or structural images.full to span the parent width, and auto when the image’s own dimensions are already correct.Note any limitations that apply to this component.
No known limitations for tile/image in Slackbot.
No known limitations for tile/image in ChatGPT.
No known limitations for tile/image in Agentforce.
Beta Feature