How to Dynamically Display Image in Power Apps?

A month ago, a client asked me to make an employee survey application for an organization. I have developed the application as they desire, but we put the company logo, text, and some stuff as static, which should not be. Cause if the client takes this application and that time they wants to put their company logo and text as per their wish. So, the logo, image, and text should be dynamic every time while developing any product.

In this article, I will explain how to dynamically display image in Power Apps with two different approaches.

Dynamically Display Image in Power Apps

Let’s discuss the methods to show the images dynamically in Power Apps.

Approach – 1: [Display Power Apps images dynamically from a SharePoint List]

The first and best approach to dynamically display images in Power Apps is to use a SharePoint list or a library. We can store your image in a SharePoint list, and then you can use that image in the Power Apps application. So, let’s begin.

Here, I have a SharePoint list named Admin Options. This list has various columns with different data types. Among them, there is an Image field called Company Logo.

Dynamically Display Image in PowerApps

Now, you need to upload the image (maybe the company logo/icon) that you want to display dynamically in the Power Apps application. Also, you need to create a single item by providing only the Title field value. (Here, I have created as ITEM1). So, whenever the user wants to update the image, they can edit this item and update their desired image.

Dynamically Display Image in Power Apps

Go back to your Power Apps application and create a global variable on the App’s OnStart property as:

Set(varCompanyLogo,LookUp('Admin Options',Title="ITEM1").'Company Logo'.Full);

Where,

  • varCompanyLogo = Variable Name
  • ‘Admin Options’ = SharePoint List Name
  • Title = SharePoint column that you want to lookup with
  • ‘Company Logo’.Full = SharePoint image field name (also you can provide the image size according to your need, either small, medium, or large)
Power Apps Display Image Dynamically in Power Apps

Next, add a Power Apps image control on the screen and set its Image property as the variable name.

varCompanyLogo
How to Dynamically Display Image in Power Apps

Finally, run the app’s OnStart property and see the changes throughout the application.

Approach – 2: [Display Power Apps images dynamically from the Media option]

Another straightforward approach is to use the Power Apps Media feature. You can directly upload the image/logo using the + Add media option, as shown below.

Power Apps show images dynamically

Then, create a variable on the Power Apps OnStart property as:

Set(varCompanyImage,'TSinfo Logo');

Where,

  • varCompanyImage = Variable Name
  • ‘TSinfo Logo’ = Image name that you have uploaded in the Media
Dynamically Display Images in Power Apps

Insert an image control and set its Image property to that variable name:

varCompanyImage

Always upload the image using the Media option with the same name.

Power Apps display image dynamically from SharePoint list

Finally, run the app’s OnStart property, and you will see the changes reflected throughout the app.

So ensure that whenever you update the image, you either run on start or refresh the application to see the changes.

I hope this article finds you helpful. This way, we can dynamically display the images/logos in Power Apps.

Moreover, you may like some more Power Apps tutorials:

>