One of the most-demonstrated Power Apps applications features is the camera uploading captured image to SharePoint and view image back on the app. The demo is typically done on the desktop, and it works without any issues. In this post, I will point out the problem I’ve encountered when displaying the same image on Power Apps mobile. It does not work quite well as expected.
Let me demonstrate.
On this Power Apps app, there are two Image controls – one has the Image property with URL, and the other is with a workaround, which we will talk about it shortly. Note that the top Image displays the image correctly during app development on a web browser.
However, when running the same app on the Power Apps mobile, it does not show anything.
Before working on the solution, let’s understand a bit how Image control displays content.
If we use the Camera control to take a picture using the capture.stream, use Image control to display the content on the Label control, we will see that data is stored as base64 encoded string.
Using this concept, we create a Power Automate flow to get the image content.
The step in the Extract $content has the following code in the Inputs:
On the screen’s OnVisible, let’s call this Power Automate to get the content with the SharePoint URL in the argument.
Now set the Image property to the below syntax.
With this, when running as a Power Apps mobile app, the image is displayed properly.