How To Align Images In A MessageML

By default, image alignment in Symphony is not set. If a customer wants to align an image to the left, centre or right of the page, use the div variable to align the image as desired (highlighted in red):

<messageML>

<div style="text-align:right">

<img src="https://symphony.com/assets/brand/thumb_symphony_shards.jpg"/>

</div>

</messageML>

Note: For the alignment to work successfully, the image must be placed within a div variable and not directly to the img variable.

The code above will then produce the image displayed below in Figure 1:

1a.png

Figure 1 Right Aligned Image

Note: Trying to align an image using the align attribute in a message/create call will result in a 400 error with the following message 'Failed to parse MessageML: Attribute \"align\" is not allowed in \"img\"'. This is because only styling the variable via the style attribute is allowed.