Hello,
I Have an app that loads Images from Sharepoint Library. Images are in a gallery and It works fine when developping the app.
However, when its deployed to new devices, the images doesn't show. The only way to make them show is by opening a new tab and opening the sharepoint site which the document library resides in. (And this is not a one time process. You have to keep doing it from time to time)
This is not practical when deplying the app to a large number of devices.
What is causing this issue and how can i Fix it?
thanks
Solved! Go to Solution.
Hi @Anonymous
I can confirm that I have just changed 600 images to URI and they now load from my sharepoint list on all devices (Android / IOS) for all users.
@JMAFO @Anonymous @Mark2457 @Newbie2019 @robinwong
You can view highly compressed and equally high quailty renditions Images or Photos files stored in any Document Library by using the {Thumbnail} property for any given image/photo or file (eg.Word documents,, PowerPoint, HTML files etc) :
Assuming you have added a SharePoint Connector to your app associated with Document Library, have added a Gallery control your app associated to that Document Library, you can thereafte simply add an image control to the Gallery and set it's properties as follows:
ThisItem.'{Thumbnail}'.Small ThisItem.'{Thumbnail}'.Medium ThisItem.'{Thumbnail}'.Large
Should you, for example, on selecting a specific row in the gallery whereby a pop-up windows appears containing an larger rendition of that same image/photo in another Image control, all you need to do is set the Image property on that control specifying the following base syntax:
Gallery1.Selected.'{Thumbnail}'.Large
The URL of the 'returned for sat the '{Thumbnail}'.Large property will look something like as follows:
https://...-mediap.svc.ms/transform/thumbnail?provider=spo&inputFormat=jpg&cs=fFNQTw&correlationId=GUID&docid=https%3A%2F%contoso%2Esharepoint%2Ecom%2F%5Fapi%2Fv2%2E0%2Fdrives%2Fb%21LR...Gwl%2Dh...bm%2Fitems%2F01.....HCL%3Ftempauth%3DeyJ…aXw0%26version%3DPublished&width=800&height=800
Note the URL (for a large thumbnail) ends with: &width=800&height=800
It is supported, albeit this blog from Chaks (a Senior Program Manager at Microsoft) describes how you can do this with the Graph APIs, this has since been implemented nataively in the SharePoint Connector per my blog post early this year:
https://masteroffice365.com/sharepoint-powered-thumbnails/
If you alternatively wish to view an ultra-high quality and equally superbly optimized rendition for any given photo, that by all accounts you'll never even be able to tell the difference between the 0.5Mb - 1Mb maximum size of the rendition compared even a 50Mb file of the original image, you can simply use the substitute function to replace the &width=800&height=800 in the thumbnail URL exposed with whatever values you want. For example:
Substitute( Gallery1.Selected.Thumbnail, “&width=800&height=800”, “&width=4096&height=4096” )
The Graph APIs do support specified custom thumbnails size, and as such this really is no different to what you can in case do with the Graph APIs. This technique is simply far easier to implement, and can be entirely dynamically set at runtime as and where you may wish to leverage it. Much like I have done in the lastest blog and corrosponding demo video I've recently published.
Hi @Anonymous,
How did you set in PowerApps to make the image show? Did you set below formula in the Image property of the Image control inside the Gallery control?
‘{Link}’
If so, then it is known that this only works in the web version of PowerApps - not on devices. To make it work on devices, you could try to convert the SharePoint images to its URI (Uniform Resource Identifier) form and bind the image control to that. The URI is basically a long text representation of the image/picture.
Do the following:
Below is the marked key section of my Flow that does the conversion to the URI format:
The formula looks as follows:
dataUri(binary(body('Get_file_content')))
The body('Get_file_content') is a reference to the previous step in which you need to fetch the actual content of the file (image in my case) from SharePoint.
Regards,
Mona
Thank you for the Reply!
er... I Think i failed to mention something..
Well the Images are in a Document Library. But There is a Sharepoint List that has a column called "ImageURL" which contains the URL's of the images in the document library.
Ex: /*mysite*/Shared%20Documents/Images/1.jpg /*mysite*/Shared%20Documents/Images/2.jpg
So inside powerapps, what im doing is just adding a Media > Image
and for the IMAGE property, im saying "Thisitem.ImageURL"
shouldn't this work?
😕
And for your method, wouldn't DataURI's size be large as the image's size?
And I have alot of images in the Document library.
The app is just Retrieving the Image related to a dropdown box selection.
Maybe we can use Flow to retrieve the image from the document library using ur method?
Thank you again..!
No Solutions?
Hey Aragorn- did you ever find a solution to this? I am having the same troubles as you did with my app.
Hi @Anonymous
I can confirm that I have just changed 600 images to URI and they now load from my sharepoint list on all devices (Android / IOS) for all users.
Using the flow to convert the image to URI is extremely slow and causes the image library to no longer open up.. is this expected behavior?
Hi @JMAFO , I had issues with using flow and an image library so placed them all in a standard sharepoint list. The column type is multiple line of text.
I used an online convertor as flow was to slow.
Cheers
@Newbie2019 thanks for the reply! So to get this clear, you used a standard SharePoint list with the multi line column that stored the data uri and then connected to that list via PowerApps data connection? Did you include the images as attachments on the list?
@JMAFO Yeah, use a standard SharePoint list with a multiline column. I simply click to add a new entry and paste the into that column. For example I called my multi column imageDataURI as below:
I then display the mage in powerapps gallery by doing a lookup based on a name which is displayed against the URI in the title column.
Let me know if this works.
Cheers
User | Count |
---|---|
256 | |
103 | |
92 | |
47 | |
37 |