cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mr-dang
Level 10

Bug: local Image reference in galleries

You can reference a local image file that has been added to the app using a text reference:

 

"appres://resources/" & "[image name here]"

Normally you would need to directly reference a local image by its filename. The method above allows you to reference the image using a text command. This is a good option if you have the name of the picture stored in a table, the images stored locally within the app, and you want to bind that table to a gallery.

 

The text method works fine in individual image boxes. It works inside galleries while you are editing as well--it just doesn't work with the app opened in cloud mode.

 

Below is a screenshot of 3 different ways I tried referencing the picture as well as two galleries using the text method.

 

2017-12-28 (2).png

 2017-12-28 (1).png

 

In that second screenshot, the individual image boxes come out okay, but none of the images showed up in the galleries which is why they appear black and empty.

 

I considered that it was a problem with the gallery itself. So I created a Radio control to switch between references for local images and online images. The local images still did not work with the text references, and the online images worked as expected. 

 

powerapps local image.png

 

 

Overall, this is a low priority issue for me since I store my images online anyway and text works great inside galleries when referencing a picture's URL.

 

Just putting this out there.

Microsoft Employee
@8bitclassroom
1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff joem
PowerApps Staff

Re: Bug: local Image reference in galleries

"appres:" uri's are internal to the PowerApps platform and should not be used directly, as their behavior is undefined. Depending on the deployment of the app, these uri's are generated differently, as you've found out above.

 

Instead, you should refer to the resource by it's name directly (not as a string). Each resource is given its own unique name in the app, just like controls. If you need a mapping, use a Collection to do this followed by a lookup if the image is dependent on some other output.

4 REPLIES 4
Community Support Team
Community Support Team

Re: Bug: local Image reference in galleries

Hi @mr-dang,

 

Thanks for the feedback.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PowerApps Staff joem
PowerApps Staff

Re: Bug: local Image reference in galleries

"appres:" uri's are internal to the PowerApps platform and should not be used directly, as their behavior is undefined. Depending on the deployment of the app, these uri's are generated differently, as you've found out above.

 

Instead, you should refer to the resource by it's name directly (not as a string). Each resource is given its own unique name in the app, just like controls. If you need a mapping, use a Collection to do this followed by a lookup if the image is dependent on some other output.

mr-dang
Level 10

Re: Bug: local Image reference in galleries

@joem, thank you for clarifying that. A table or collection makes sense. 

Microsoft Employee
@8bitclassroom
Super User
Super User

Re: Bug: local Image reference in galleries

Is there any way to convert the "appres"  either in PowerApps or in Flow where it can be saved as a jpg or pdf?

 

Specifically I am trying to for the use of the Pen Inut. I can make it display fine within PowerApps and I also know how to make the Pen Input email but I would like to be able to save it as a file type that can be retrieved easily outside of powerapps for various reasons. 

 

I have one that when an item is created it generates a pdf and then saves that pdf as an attachment on that specific sharepoint list and I would like to do something similar for this, but on the other I did it in HTML code and because of the way my data is pulling (from multiple SP List) this would be better in Excel or Word. To pull the data in those correctly is not an issue...it is the signature I am struggling with. Flow is really my top choice on achieving this but I have not had any luck yet.

 

Any ideas?

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 51 members 4,645 guests
Recent signins:
Please welcome our newest community members: