We have a size limit of 1MB per data uri for inline embedded images, i.e. the image cannot be more than 1MB after base64 encoding. This only applies to embedded images inside of the mail body. Bear in mind the size of an image after being converted to a base64 string increases. Depending on the image compression, format, and other characteristics it can increase anywhere between 25% to 50%. For instance, an image of more than 700KB will after being converted to a base 64 string likely exceed the 1MB limit stated above.
{
"message": {
"subject": "test",
"body": { "contentType": "HTML",
"content": "<table border=\"1\" cellpadding=\"6\" cellspacing=\"0\"><tr><th>Image</th><th>Test row</th></tr><tr><td><img src=\"cid:mycid\" style=\"max-width:160px;height:auto;border:0\"/></td><td>Test</td></tr></table>"
},
"toRecipients": [ { "emailAddress": { "address": "telen@contoso.com" } } ],
"attachments": [
{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "myPic.png",
"contentType": "image/png",
"contentBytes": "@{base64(body('Get_attachment_content'))}",
"isInline": true,
"contentId": "mycid"
}
]
},
"saveToSentItems": true
}
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2