Display SharePoint Images in Power Apps Canvas Apps

Power Apps and SharePoint are powerful tools often used together to build business applications rapidly. A common requirement is the ability to display images stored within a SharePoint list directly within a Power Apps Canvas app. Whether you're creating employee directories, product catalogs, asset management systems, or inspection applications, incorporating images significantly enhances the user experience by providing crucial visual context.

In this article, we will guide you through the straightforward process of displaying images from a SharePoint list within Power Apps.

Why Display SharePoint Images in Power Apps?

Integrating images from SharePoint into your Power Apps offers several key benefits:

Prerequisites

Before you begin, ensure you have the following:

Step 1: Create a SharePoint List

First, let's set up a sample SharePoint list to hold our image data. Navigate to your SharePoint site and create a new list.

Example List Name: EmployeeDirectory

Example Columns:

Save your list once the columns are created.

Step 2: Add Sample Records

Populate your SharePoint list with some sample data. For each record, ensure you upload an image into the EmployeePhoto column.

Example Data:

EmployeeNameDepartment
John SmithIT
Sarah JohnsonHR
David BrownFinance

Step 3: Connect SharePoint List to Power Apps

Open your Power Apps Studio and connect to the SharePoint list you just created.

  1. Navigate to the Data tab on the left-hand pane.
  2. Click + Add data.
  3. Search for and select SharePoint.
  4. Choose your SharePoint site and then select the EmployeeDirectory list.

Your SharePoint list is now available as a data source in your Power App.

Step 4: Insert a Gallery Control

To display multiple records, we'll use a gallery. Insert a gallery control into your Canvas App:

  1. Go to the Insert tab.
  2. Select Gallery, and then choose a Vertical Gallery.
  3. Set the Items property of the gallery to your SharePoint list name: 'EmployeeDirectory'.

The gallery will now populate with the records from your SharePoint list.

Step 5: Add an Image Control

Inside the gallery template, add an Image control to display the photos:

  1. With the gallery selected, go to the Insert tab.
  2. Select Media, and then choose Image.
  3. Set the Image property of this Image control to display the photo from the SharePoint column. For an Image column, the formula is: ThisItem.'EmployeePhoto'.Url. If you used the '.Full' suffix as in the source document, it would be: ThisItem.'EmployeePhoto'.Full. We'll use .Url for broader compatibility.

This formula retrieves the URL of the image from the EmployeePhoto column for each record in the gallery.

Step 6: Display Additional Information

You can easily add other data points from your SharePoint list to the gallery. Insert Label controls inside the gallery template and set their Text properties:

Your gallery should now display the employee's photo, name, and department.

Step 7: Configure Image Size and Positioning

To ensure images look good within the gallery, adjust their size and positioning:

Complete Gallery Example Configuration

Here’s a summary of the properties for the controls within the gallery template:

Alternative Approach for Attachment Columns

If your images are stored as Attachments to SharePoint list items rather than in a dedicated Image column, you can reference them using this formula for the Image control's Image property:

First(ThisItem.Attachments).AbsoluteUri

This formula retrieves the URL of the first attachment associated with the current list item.

Real-Time Example: Asset Management App

Imagine building an Asset Management App using a SharePoint list with the following columns:

Using the steps outlined above, your Power App can easily display the AssetImage alongside the AssetName, AssetNumber, and AssetStatus, making asset tracking significantly more user-friendly and efficient.

Benefits Recap

Best Practices

Common Use Cases

Troubleshooting Common Issues

Conclusion

Displaying images from a SharePoint list within Power Apps is a powerful technique that significantly enhances application usability and user engagement. By connecting your SharePoint list, utilizing a Gallery control, and configuring an Image control with the correct data binding, you can effortlessly present rich visual data to your users. This approach is ideal for a wide range of business applications, including employee directories, product catalogs, asset management solutions, and any scenario requiring image-based information.