Skip to Content
Menu
This question has been flagged
2 Replies
3659 Views

There seems to either be something I am missing, or something is not working right.

I set the company Logo in 'my companies' configuration, but it refuses to replace the 'my logo' placeholder on my system generated emails. The testing emails I have been using are quotation emails and purchase order emails. The logo will not show, but oddly enough the logo does show on the attached document (ie. attached invoice PDF).

I need to send my first invoice to one of my clients asap, so I would appreciate any help that one can give me so that I don't end up looking unprofessional when I send it to them to sign.


Thanks in advance!

Avatar
Discard
Author

What I have tried so far:

Refreshing browser cache

Removing / replacing logo with an image that works on one of my other Odoo instances

Rebundling asset bundles

Restarting Odoo14 service + DB + WebServer

I have also tried hunting for functionality to manually change the header for outgoing emails, but I can't seem to find where to do that. Email templates are just for email body content.

Any other ideas would be much appreciated.

Did you ever solve this issue?
I am running into exact the same problem.

Best Answer

Hi,

Hi,

To embed an image in an email template in Odoo, you can use base64 encoding. Here's the way to do it:

<img t-attf-src="data:image/*;base64,{{ company.logo }}" t-att-alt="company.name"/>

In this snippet:

       

  • t-attf-src attribute sets the source of the image. Here, {{ company.logo }} is a placeholder for the base64 encoded string of the image.
  •    

  • t-att-alt attribute sets the alternative text for the image, which is useful for accessibility purposes.

Make sure to replace {{ company.logo }} with the actual base64 encoded string of the image. This method ensures that the image is embedded directly within the email template



Hope it helps



Avatar
Discard
Best Answer

we also need how did you solve guys

Avatar
Discard
Related Posts Replies Views Activity
0
Jul 21
2067
1
Jul 15
5634
1
Nov 22
2717
2
Sep 21
12890
1
Mar 15
6807