0

Is there a way to convert a banner image to a base64 using flows / power automate? Any of the get content actions for SharePoint does not work for banner image.

1 Answer 1

0

My test flow for your reference: enter image description here

Test result: enter image description here

You can take it out like this:

enter image description here

Expression:

base64(outputs('Get_file_content_using_path')?['body'])
5
  • Thanks but you are using a file. I am not creating a new file. I want to get the banner image of a news post. Commented Mar 15, 2021 at 14:57
  • That is just a trigger action, just to get the corresponding picture.
    – Amos
    Commented Mar 16, 2021 at 2:19
  • I'm using get file properties to return the banner image url and this is the url being returned: "https://mysite.sharepoint.com/sites/mysite/_layouts/15/getpreview.ashx?guidSite=42da643b9fb544f0ba63dca47012bb15&guidWeb=31b8be1c434b4f3ea7f697d9cb6b8161&guidFile=0c55849d5de6488ab7cf9163ae00ed51&ext=jpg" which doesn't look right. Commented Mar 16, 2021 at 10:08
  • Could you get the image when you request the url in browser?
    – Amos
    Commented Mar 19, 2021 at 9:32
  • I figured out that the URL of the banner does not point to the individual site URL (in your case /sites/dev) but instead links to the site-collection itself (mysp.sharepoint.com/_layouts/15). This is a problem for the action "Get File content using path" as it expects a site URL and seems not able to handle the base URL of the site collection. Any tips how to copy the image to a temp SharePoint, get file content and delete the file afterwards?
    – Der_Fab
    Commented May 13, 2022 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.