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 Automate / Convert Image to Base6...
Power Automate
Unanswered

Convert Image to Base64 in Power Automate

(0) ShareShare
ReportReport
Posted on by 22

I have a Power Automate action that requires an image in base64. Is there a way to convert a given image to base64 using Flow via an action or Expression builder?

Categories:
I have the same question (0)
  • Verified answer
    CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    Hey Mate @jokanol1 

     

    You can use the Expression - base64(<your file content>)

     

    CFernandes_0-1636051239053.png

     

    If you are getting content from a SharePoint the you direct convert it  - using the formula -

     

     

    CFernandes_0-1636051656266.png

     

    outputs('Get_file_content_using_path')?['body']?['$content'] 
     
    CFernandes_1-1636051702024.png

     

     

    https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/#:~:text=To%20use%20an%20expression%20in,See%20more%20on%20each%20category

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

  • jokanol1 Profile Picture
    22 on at

    It worked, thanks!

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @jokanol1 I am glad that your problem is resolved.😊

  • wael_khanji Profile Picture
    151 on at

    Hi 

    there is any way to know the size image ?? 

    I mean to avoid failed action if the size is more than 28Kb

     there is any expression use it on condition if size more than 28 don't use it 

  • Nantoanina Profile Picture
    11 on at

    Hello,

     

    I have same issue but my image is from PowerApps 

    I try same function but i alwayse get data like below

     

    Nantoanina_0-1685620596158.png

     

    If you have any idea how to get "contentBytes" ??

     

  • jt_michels Profile Picture
    2 on at

    I know this has been a while, but wanted to respond in case you needed it.  The contentBytes is indeed the base64 for your image.  i.e. to view it you could enter it as a data URI for an image as data URI with the format data:[contentType]/[format];base64,{contentBytes} so for your png image:

     

    "data&colon;image/png;base64,{contentBytes}"

     

     

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard