Microsoft graph API, Inline image is not visible in Windows outlook app
Hello, i am trying to send inline image which is about 1 mb or 1.5 max but its working in all platform like Mac outlook app and browser even its working in windows browser outlook app but not working windows outlook desktop app, can anyone please help me with it below is my mail body obejct const updatedBody = body.replace(/<img src="data:image/\w+;base64,([^"]+)"[^>]*>/g, (_, base64String, index) => {
const imageSize = Math.ceil((base64String.length * 3) / 4);
if (imageSize <= maxInlineImageSize) {
const contentId = image${index}
;
attachments.push({
"@odata.type": "#microsoft.graph.fileAttachment",
name: image${index}.jpg
,
contentId: contentId,
contentBytes: base64String,
isInline: true,
});
return <img src="cid:${contentId}" />
;
} else {
return <img src="http://example.com/placeholder.jpg" alt="Image size too large"/>
;
}
});
return {
message: {
subject: subject,
body: {
contentType: 'HTML',
content: updatedBody
},
toRecipients: [
{
emailAddress: {
address: receipient
}
}
],
internetMessageHeaders: [
{
"name": InternetHeader.XSeismicOutlookPlugin,
"value": "true"
}
],
bccRecipients: (!!bcc && bcc.length > 0) ? bcc.map((bccEmail: string) => ({
emailAddress: {
address: bccEmail
}
})) : [],
attachments: attachments
},
saveToSentItems: 'false'
};