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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Load images from SQL t...
Power Apps
Unanswered

Load images from SQL table URL records

(1) ShareShare
ReportReport
Posted on by 24

I've built an app that connects to a SQL database. I have a SQL table that contains links to images saved in Sharepoint cloud storage.

 

Like this:

Product IndexProduct NameProduct Image
1Product_1SharePoint_URL_1
2Product_2SharePoint_URL_2
3Product_3SharePoint_URL_3

 

Is there a way I can load and display the images in my app?

 

Note: despite having SharePoint, I don't want to use SharePoint Lists. We're committed to organizing all our data through SQL.

Categories:
I have the same question (0)
  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Hi @_Nick_ 

    If the SharePoint URL resolves to an actual image, you can display the image in an image control.

    Let's say you add a gallery control with the Items property set to your SQL table, you would add an image control to the gallery and set the Image property to ThisItem.ProductImage

  • _Nick_ Profile Picture
    24 on at

    That's what I thought, but if I go to edit the fields of the gallery, the image dropdown only references image files that have been directly uploaded to the app. I can definitely access the URL column in general, because I can select it using the "Title" dropdown.

     

    _Nick__0-1712780561803.png

     

    I'd do the ThisItem.ProductImage thing, but I don't get an "Image" property in the Gallery's property list.

     

    _Nick__1-1712780799167.png

     

  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Hi @_Nick_ 

    If you select the Image control from the gallery, you should be able to see the Image property (which you would set to ThisItem.ProductImage)

     

    timl_0-1712781384128.png

     

  • _Nick_ Profile Picture
    24 on at

    Oof, rookie mistake -- thanks for your help so far, @timl 

     

    However, I'm still not getting image content for some reason.

     

    _Nick__0-1712847462705.png

    LEFT: A vertical gallery, effectively pulling the Product_Image_URL and Product_ID as title/subtitle content (where applicable) from the SQL table. However, the images, using the same ThisItem.product_image function, aren't returning the actual images. The only suggestion something might be happening is the weird blue line showing up for Product 23...

     

    RIGHT: trying to get an independent Image object to work outside of the gallery context, I've the lookup function indicated in the formula bar to pull up the SharePoint URL record directly (Note: in my SQL table, the "Product Image" column is actually "print_orient"). Also no image showing.

     

    Maybe I'm using the wrong URL? Here's the URL for the Product 23 image:

     

    https://company.sharepoint.com/sites/ProductionCentral/Shared%20Documents/Forms/AllItems.aspx?FolderCTID=0x01200028A2AF2D103A7343AE15D29B3E7F65FD&sortField=LinkFilename&isAscending=true&id=%2Fsites%2FProductionCentral%2FShared%20Documents%2FData%20Unification%2FShop%20Floor%20Drawings%2FPrint%20Orientation%2FTC16%2Epng&viewid=0ba7744b%2Dc022%2D42f6%2D9ca8%2D07c74868d48e&parent=%2Fsites%2FProductionCentral%2FShared%20Documents%2FData%20Unification%2FShop%20Floor%20Drawings%2FPrint%20Orientation

     

    Should that be working, or should it be an URL that ends in .png or something?

  • _Nick_ Profile Picture
    24 on at

    Alright, after continued investigation, my conclusion is this: URLs won't work.

     

    You need the image content to be directly in a table-type format. I got it to work by create a new "List" in the SharePoint space. From what I've read, I should also be able to store image content directly into my SQL tables.

     

    Note: calling up images in Power Apps, but they're all blurry? Apparently "thumbnail" format is the default -- add ".Full" to your image reference to make it have the max resolution.

     

    Thanks for reading, hope your troubleshooting wraps up asap.

  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    With regards to your SharePoint URLs, are you sure that the URLs return the actual image? A SharePoint URL that displays an image can sometimes be a URL to a placeholder SharePoint page that hosts the image, so it's important to make sure that you're using the URL that returns the actual image.

    Whilst it's possible to store images in SQL Server, storing the image in SharePoint or Dataverse is preferable because it provides the thumbnail functionality you refer to. Also, these data sources provide direct support for adding/deleting/updating images which isn't the case with SQL Server.

  • _Nick_ Profile Picture
    24 on at

    Aha, I think you're right about the placeholder page vs the actual image URL. Thanks! However, no matter the URL I save in SQL, PowerApps just reads it as the text it is.

     

    My team also ran into permissions issues pulling actual images from SQL into Power Apps, so the SharePoint List method has ended up being the most functional. And to your point, it's going to be way easier managing that image content in SharePoint than it would have been through SQL.

     

    Thanks again, @timl !

     

     

  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Thanks for the update @_Nick_ - glad to have helped in some way.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard