I have a issue related to adding image in email. I have added image in mail template and it is showing me in preview but while sending mail it is showing me broken image. When i am using it with base64 encoding then it is showing me in attachment not in mail body. While doing R&D on this issue, I found that google block base64 encoding images and show them as attachment not as mail body. Based on that i have tried several solution found on google but couldn't solve this issue.
Below is my mail template where i am trying to add image in mail body:-
<record id="birthday_mail_template1" model="mail.template">
<field name="name">Email Notification 1</field>
<field name="model_id" ref="MODULE_NAMW.model_hr_employee"/>
<field name="email_from">${object.env.user.email}></field>
<field name="email_to">${object.name|safe} ${object.work_email}</field>
<field name="subject">Dear ${object.name}</field>
<field name="body_html"><![CDATA[
<head>
<meta charset="UTF-8">
<title>This is test mail ${object.name}</title>
<body>
<img src="/hrms_birthday/static/src/img/birthday.png" style="padding: 0px;
margin: 0px; height: auto; width: 80px;" />
<!-- alternative image added with base64 -->
<img src="data:image/png;base64,${object.image}" style="width:
150px;height: 80px;" />
</body>
]]></field>
</record>
I have tried implementing image with encoding base64 and with absolute path but both are not working for me. Do any one have any idea how to solve this issue and can add image in mail body?