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 / show image and pdf ico...
Power Apps
Answered

show image and pdf icon using Absolute.uri

(0) ShareShare
ReportReport
Posted on by 82

Hello experts,

 

I'm trying to create my App with the ability of showing the image of the attachments. I've tried the function ' getpreview' from sharepoint. However, the function in Power Apps does not seem to work in my App. I tried with First(ThisItem.Attachments).AbsoluteUri and  First(ThisItem.Attachments).Value. None of these functions worked.

 

When I only used First(ThisItem.Attachments).Value for the imported picture, I can see the picture in the App. problem2.PNG

 

 

 

 

 

 

problem1.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best regards,

exploring Explorer G

Categories:
  • WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @exploringG ,

    If yu want Thumbnails of Attachments for PDF files (and some others) as well as Image files, you need this (replace with your Domain Name)

    https://yourdomainname.sharepoint.com/_layouts/15/getpreview.ashx?path=" & First(ThisItem.Attachments).AbsoluteUri

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • exploringG Profile Picture
    82 on at

    Hi Warren,

    Thank you for the quick solution. I typed in exactly what you suggested here with my own domain name but the thumbnail does not show on my app. I have no idea why. The video I followed worked fine.

    I have also tried to open the preview of my pdf file with this url and it also worked fine.

     

     

    https://mydomain.sharepoint.com/_layouts/15/getpreview.ashx?path=https://mydomain.sharepoint.com/sites/ProjectResources/Lists/List/Attachments/11/paper.pdf

     

     

    When I put it into power apps fx formular, pdf preview does not show up.

    I'm confused.

  • Verified answer
    WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    Hi @exploringG ,

    Here is a test I did here using four different file types

    AttachmentThumbnailView.jpg

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • exploringG Profile Picture
    82 on at

    Hi @WarrenBelz ,

     

    Thank you very much for your help. I changed to another laptop and all worked out fine. 

    Once again, thank you!

     

    Best, 

    happy exploring ExplorerG

  • aytekors15 Profile Picture
    16 on at

    Hi Warren,

     

    I am using the same structure as you mentioned above. When I use the app I can preview the images, however when my colleagues use it, they can not (including mobile devices). Do you have an idea why they can not see? (They have a view access and they can open those files)

  • WarrenBelz Profile Picture
    156,756 Most Valuable Professional on at

    @aytekors15 ,

    That is correct - URL-based images will not resolve on mobile devices unless they can be done anonymously (not requiring a log in such as SharePoint).

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard