web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Weird bug with image r...
Power Apps
Unanswered

Weird bug with image resources

(0) ShareShare
ReportReport
Posted on by 471

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!

Categories:
  • Meneghino Profile Picture
    6,949 on at

    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:

    ClearCollect(MyImages,
     {Id:1, MyImage: ImageNameX},
     {Id:2, MyImage: ImageNameY},
     etc. etc.)
  • davidstone Profile Picture
    471 on at

    Thanks.

     

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

  • Meneghino Profile Picture
    6,949 on at

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

     

    LookUp(MyImages, Id=YourParameter, MyImage)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard