-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to use image in Adaptive Card without direct URL to the image ? #2164
Comments
Data URIs are already supported by the nodejs Adaptive Card renderer. Have you tried using them? |
@dclaux , I haven't tried them. Is there any example usage you can point me to to refer ? That will be helpful. 'When you use the /photo/$value endpoint to get the binary data for a profile photo, you'll need to convert the data into a base-64 string in order to add it as an email attachment. An example in JavaScript of how to create an array that you can pass as the value of the Attachments parameter of an Outlook Message.' |
Have you followed the link l posted above? There are samples there. Here is a data URI from that page used in an Adaptive Card, try it in the designer:
|
@dclaux, Yes, I was reading wiki page link you shared but, was stuck at obtaining data part on the URI data:[][;base64], I am guessing it's a base-64 string of image bytes. Thanks for your help. |
Platform
What platform is your issue or question related to? (Delete other platforms).
Nodejs
host
Are you an author (like sending something to Outlook), or a host that is rendering your own cards?
Version of SDK
Bot builder v3
Issue
I would like to use user's profile image from MS graph in adaptive card. I have determined the API call I need to make is as follows
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/profilephoto_get
In this case I would be getting image as a binary data for a profile photo, that needs to converted into a base-64 string.
But, based on adaptive cards schema document looks like we should use URL property where value should be direct URL to the image
'url string Yes The URL to the image'
How should I approach this ? If there any way to use an IMAGE in Adaptive Card w/o direct URL to the image ??
The text was updated successfully, but these errors were encountered: