Display SharePoint Images in Power Apps Canvas Apps

Leveraging SharePoint Images in Power Apps Canvas Apps

Images stored within SharePoint document libraries are a common asset in many business applications. Power Apps Canvas Apps provide a powerful and intuitive way to surface these images dynamically, greatly enhancing user experience for tasks involving document previews, product catalogs, employee profiles, and more.

This guide will walk you through the straightforward process of connecting your SharePoint document library to a Power Apps Canvas App and displaying those images effectively.

Step 1: Prepare Your SharePoint Document Library

Before you can display images in Power Apps, they need to be readily available in SharePoint. The first step is to:

Step 2: Connect Power Apps to SharePoint

Once your images are organized in SharePoint, you need to establish a connection from your Power App to this data source.

  1. Open Power Apps Studio: Navigate to Power Apps Studio and open the Canvas App you are working on, or create a new one.
  2. Add Data Source: In the left-hand navigation pane, click on the Data icon.
  3. Select SharePoint: Click on + Add data, then search for and select SharePoint.
  4. Choose Your Site and Library: Select your SharePoint site from the list, and then choose the specific document library where you uploaded your images. Click Connect.

Step 3: Insert and Configure a Gallery Control

A gallery control is ideal for displaying multiple items from a data source, making it perfect for showcasing a collection of images.

  1. Add a Gallery: From the Insert tab in Power Apps Studio, choose Gallery and select a Vertical gallery (or your preferred layout).
  2. Set the Items Property: With the gallery selected, go to the properties pane or the formula bar. Set the Items property of the gallery to the name of your connected SharePoint document library. For example, if your library is named 'ProductImages', the property would be ProductImages.

Step 4: Display Images within the Gallery

Now, you'll configure the gallery to display the actual images from your SharePoint library.

  1. Insert an Image Control: Inside the first item of your gallery (you can select the first item by clicking on it within the gallery), insert an Image control.
  2. Set the Image Property: Select the newly added Image control. In the formula bar, set its Image property. The exact property name might vary slightly based on how SharePoint returns the data, but common options include:
    • ThisItem.'Link to item': This often provides a direct URL to the file.
    • ThisItem.FileRef: Another common property that points to the file's location.
    • ThisItem.AbsoluteUri: If available, this can also be used.
    You might need to experiment with these properties to find the one that works correctly for your specific SharePoint setup. A typical formula would look like: ThisItem.'Link to item'.

Step 5: Test Your Power App

The final and crucial step is to test your application to ensure everything is functioning as expected.

  1. Preview the App: Click the Play button (or press F5) in Power Apps Studio to preview your application.
  2. Verify Image Display: Check that the images from your SharePoint document library are appearing correctly within the gallery in your Power App. If images are not loading, revisit the Image property in Step 4 and ensure you've selected the correct field from your SharePoint data.

Benefits of This Integration

Integrating SharePoint images into your Power Apps offers several significant advantages:

Conclusion

Displaying images stored in SharePoint document libraries within your Power Apps Canvas Apps is a highly effective method for enriching the user experience and providing visual context. By establishing a clear connection between SharePoint and Power Apps, and correctly configuring the gallery and image controls, you can build more dynamic, visually engaging, and informative business applications.