cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Get base64 from imagecontrol

Hi

 

Is there a way to get the base64 from a regular imagecontrol?

 

I know I can get it from a PenInput with JSON(PenInput1.Image,IncludeBinaryData) but this doesn't seem to work in Image1.Image.

 

For the record: Image1.Image is a dynamic URL from Googles Chart API: 

https://chart.googleapis.com/chart?cht=qr&chs=250x250&chl=blabla

 

So that might be the problem, but I really want the QRCode that's generated by the url as base64.

 

I want to put the QR code in a PDF. And since I'm using power automate to convert html to pdf, I need Base64.

 

Any ideas?

 

1 REPLY 1
Super User III
Super User III

@Pieter_NL 

Yes, this is a problem when you use a URL for the Image source.  To use the JSON function on the image it will convert the referenced url to the base64.  If the image source is a local image or some other existing image, then it will convert to base64 (as technically it already is).  But for the url, if you JSON that...it will return the url.

 

Can you not just put an image control in your HTML to show the image from the URL and then when you convert to PDF...it should be there.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (27,092)