MessageML supports the following tags to embed media into messages:
Tags
Description
Attributes
<img src="url"/>
Image. Images have a max height of 256px; otherwise, the default size is the size of the image. For more information on how to send images through API call, refer to Sending images.
• src
• class
Rules and Limitations via an example
For the following examples, we are sending an SVG image along with the message.
Note that an admin user might have to enable the sending of some specific file types. To do that, go to AC Portal >> Company Settings >> Edit Entitlements >> File Types.
• Sending an image via the Create Message API using the image URL
Sending an image via Create Message API using Data URL (base64 encoding).
Note that it is necessary to include data:image/imageType+xml;base64 before the data string, as shown in the following example:
This feature is intended to be used for small images, such as custom emoji. Our recommendation is that the total size of base64 encoded embedded images do not exceed 25KB per message.
Examples
Here after you can find an example of a message sent by a bot and containing an inline image as well as the structure of the messageML sent:
<messageML>
<h1>Images</h1>
<p>This is an image: <img src="https://play-lh.googleusercontent.com/-lTkJjeUtCj3Mf4FLLNKnCyQC0Amur3wxeKxkwbDZl0hjO60H1_VodAuBDKJmYWOvlfG=s180-rw" /></p>
</messageML>