> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/how-to-add-images-onthe-data-table.md).

# How to add images on the Data Table

Show a picture in each row of a screen flow Data Table, such as the deal owner's photo, with the Avatar column type and its type attributes.

When a sales manager reviews open deals in a screen flow, a face next to each opportunity answers "whose deal is this?" faster than a name in a column. The Avonni Data Table shows any image URL stored on the row as an avatar, here the photo of the opportunity owner, with the owner's name beside it.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fx377b53nVyAMOBxO7F1P%2Fdata-table-tutorial-how-to-add-images-onthe-data-table-result.png?alt=media" alt="A Data Table of opportunities where the Owner column shows each owner&#x27;s photo in a circle next to their name"><figcaption><p>The Owner column shows each deal owner's photo with the Avatar type.</p></figcaption></figure>

## Before you start

* A screen flow with the Avonni Data Table on a screen. New to the component? Start with [Learn the Basics](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/learn-the-basics.md).
* A field that holds an image URL for each row. Users already have one: the photo URL on the User record (`SmallPhotoUrl`), which you reach from an opportunity through its owner. For your own images, a URL field or a text formula field that returns a URL works the same way.
* To read a field of a related record (the owner's photo), use a **Query** data source. A Get Records collection only carries the fields of the object itself; with a **Variable** source, the other route is a formula field on the object that returns the parent field. See [Data Source](https://docs.avonnicomponents.com/flow/flow-components/data-table.md#data-source).

## Steps

{% stepper %}
{% step %}

### Load the deals

1. Select the Data Table on your screen and click **Open Component Builder**.
2. In the **Properties** tab, under **Data Source**, choose **Query** and pick the **Opportunity** object.
3. Add the columns **Opportunity Name**, **Stage**, **Amount** and **Close Date**.
   {% endstep %}

{% step %}

### Add the image column

1. In the **Properties** tab, under **Data Mappings** > **Columns**, add a column and set its **Source Field** to the owner's photo URL, `Owner.SmallPhotoUrl`.
2. Turn on **Custom Label** and name the column `Owner`.
3. Open the column's **Type Attributes** (chevron on the column header in the preview) and set **Type** to **Avatar**.

The column value is the image source: each row shows the picture found at that URL.
{% endstep %}

{% step %}

### Configure the avatar

Still in **Type Attributes**, set how each picture looks:

| Setting                      | What it does                                                                                                   | For this example |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------- |
| **Variant**                  | Shape of the picture: **Circle** or **Square** (default).                                                      | **Circle**       |
| **Size**                     | From **X-Small** to **Xx-Large** (default **Small**).                                                          | **Small**        |
| **Primary Text**             | Text shown beside the picture. Turn on the **Field Name** toggle so each row reads its own value from a field. | `Owner.Name`     |
| **Secondary Text**           | A second line under the primary text.                                                                          | Leave empty      |
| **Initials**                 | Letters shown when there is no image.                                                                          | Optional         |
| **Fallback Icon Name**       | A Lightning Design System icon shown when the image fails to load.                                             | `standard:user`  |
| **Link** and **Link Target** | Makes the picture a link, for example to a record or a profile page.                                           | Leave empty      |

**Status** and **Presence** add a small indicator on the picture. They are useful when a field of the row holds that value.

{% hint style="warning" %}
When **Primary Text** reads a related field such as `Owner.Name`, also add that field as a visible column (for example **Owner Name**). Without it, the text beside the picture stays empty when the flow runs. A field of the row itself, such as `Name`, works without the extra column.
{% endhint %}
{% endstep %}

{% step %}

### Save and test

Click **Done**, save the flow and run it with **Debug**.

Each row shows the owner's photo in a circle with the owner's name beside it. A user who never uploaded a photo shows the default Salesforce silhouette, because that is what their photo URL points to.
{% endstep %}
{% endstepper %}

The video below builds a similar table with progress bars, star ratings, badges and avatars in a screen flow.

{% embed url="<https://www.youtube.com/watch?v=YGPwolKa-pw>" %}

## Troubleshooting

<details>

<summary>The column shows a broken image or the fallback icon</summary>

The URL in the field does not return an image the browser can load, or the field is empty for that row. Open the URL in a new tab to check it. Set **Initials** or **Fallback Icon Name** so those rows still show something meaningful.

</details>

<details>

<summary>Images look stretched or cropped</summary>

In the **Style** tab, the **Avatar** section has **Image Object Fit**, which controls how the picture fills its frame.

</details>

## Related tutorials

* [Displaying a record as a QR code](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/displaying-a-record-as-a-qr-code.md): another column type that draws from a field value.
* [Customizing the badge color using a formula](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/tips-and-tricks/customizing-the-badge-color-using-a-formula.md): color a Stage badge from a formula field.
* [Handling formula text fields](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/tips-and-tricks/handling-formula-text-field.md): show an image built by an `IMAGE()` formula instead of a URL.
* [Data Table reference](https://docs.avonnicomponents.com/flow/flow-components/data-table.md): every column type.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/data-table/how-to-add-images-onthe-data-table.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
