Thank you for adding Teams development tag to address this issue to the development team.
How to add html link element with a image in a Teams Chat message POST with body of contentType="html"
ArmbrusterMarkus-4875
0
Reputation points
MS graph API is used to POST chat message with contentType="html" to Teams channel -> https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http
Requirement is to add a link element to the message which has a image (which is included in the chat message) and a text.
- base64 encoded inline images are not displayed in the chat message
<a href="https://..."><span><img src="data:image/png;base64,..." />Some text</span></a>
- image added as hostedContents are not displayed if image is a child element of a link
<a href="https://..."><span><img src="../hostedContents/1/$value" /> Some text</span></a>