cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jean_9681
Helper III
Helper III

Converting HTML to Image.JPG is not working

I have my HTML in a compose action and i am able to convert it to an HTML file, this HTML file shows the image


However, while trying to convert the HTML file to JPG the image does not show instead the there is white(blank) image with a red x mark on top left corner.

 

What am i missing here ?  - This is what i have in my flow

 

convertfile.png

 

Any suggestions

Thank you,

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Jean_9681,

 

In that case you can use a get file content using path action instead.

 

Also update the expression to this:

concat('data:', body('Get_file_content_using_path')?['$content-type'] ,';base64,',body('Get_file_content_using_path')?['$content'])

 

getfilecontent_usingpath.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @Jean_9681,

 

What is in your compose action? Is the img src pointing to a hyperlink or are you pointing to a base64 value?

 

If you are pointing to a public image you could try the approach below.

In this example I used the screenshot from your opening post btw 😁

 

concat('data:', body('HTTP')?['$content-type'] ,';base64,',body('HTTP')?['$content'])

 

getfilecontent_base64.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


@Expiscornovus  thanks for the taking the time to help me with this, In my case I am getting an image from SharePoint library..  
My Compose action has <img src pointing to "Link to Item">

Since HTTP action is a PREMIUM  I am not allowed to use this action 😞
Will Send an HTTP request to SharePoint work - since i am getting the image from SharePoint


Expiscornovus
Super User
Super User

Hi @Jean_9681,

 

In that case you can use a get file content using path action instead.

 

Also update the expression to this:

concat('data:', body('Get_file_content_using_path')?['$content-type'] ,';base64,',body('Get_file_content_using_path')?['$content'])

 

getfilecontent_usingpath.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


@Expiscornovus  Thank you so much, this worked 👍

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,256)