Showing results for 
Search instead for 
Did you mean: 
Level 8

Weird bug with image resources

I'm trying to dynamically build a path to the resource for a particular Media object.


I worked out that I could concatenate "appres://resources/" along with some other letters which, strung together, point to one or another image. It's fairly rudimentary - it could be "EL_GR", and I'm just using a bunch of conditions to decide which letters to use.


When I put my formula into a label it correctly displays the full path to a valid resource, eg "appres://resources/EL_GR" - perfect.


Even better, I can put that formula into the 'Image' property of my media object - and it works! ...IN the desktop builder.


Once I publish, running on web or mobile, the media object no longer displays the actual image.


So to check it was still the same path on web and mobile, I placed a label and set its text value to simply 'EL_GR', directly referencing the media asset. On the app, it then displays the same resource path, as expected. So I published again, and all of a sudden the image now displays!


So in a sense I have a workaround - I can concat all my resources into a Label value and hide the label, and then everything is good.


But there's surely something wrong there for me to have to do this?


Thanks for any insight!

Level 10

Re: Weird bug with image resources

Hi @davidstone

I think the best way to resolve this is to load the images into a collection with a unique column to identify them.

Then you can dynamically look up the image.

Please let me know if you need details on this, but loading the collection is basically:

  {Id:1, MyImage: ImageNameX},
  {Id:2, MyImage: ImageNameY},
 etc. etc.)
Level 8

Re: Weird bug with image resources



How would I then reference the image I wanted to display?

Level 10

Re: Weird bug with image resources

You should use the following as the Image property of an image control


LookUp(MyImages, Id=YourParameter, MyImage)

Helpful resources


Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!


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


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

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


Join PowerApps User Group!!

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

Top Kudoed Authors
Users Online
Currently online: 373 members 5,089 guests
Please welcome our newest community members: