Skip to main content
December 28, 2022
Solved

I have a requirement to attach a logo in email Body, but that does not work

  • December 28, 2022
  • 10 replies
  • 0 views

In my HTML template, I tried adding <img src="cid:image.png" ALT="Screenshot"/>. But its not displaying logo in the body, its displaying as empty image. Can someone clarify what does cid mean? also please let em know the way to achieve this.

Best answer by mikes0011

To clarify, are you also attaching the image to the email as a normal attachment, with the exact filename of "image.png"?  I believe this is required (at a minimum) to make this technique work, though I will also disclaimer that I don't test this very frequently so I may be forgetting some tertiary requirements.

10 replies

mikes0011
mikes0011Answer
Brainy
December 28, 2022

To clarify, are you also attaching the image to the email as a normal attachment, with the exact filename of "image.png"?  I believe this is required (at a minimum) to make this technique work, though I will also disclaimer that I don't test this very frequently so I may be forgetting some tertiary requirements.

The Expression Guru
December 28, 2022

Thank you so much, that works! Any suggestions to add link to the logo which will take us to a webpage, if the logo is clicked.?

mikes0011
Brainy
December 28, 2022

I haven't tried this, but you could try the standard HTML tag for adding a link (which can wrap an image, as best as i remember), the tag being "<a href="(url)"> ... </a>.  If you need to include anything special to make it work with the IMG tag, i forget but you should be able to find it in public HTML primers.  Let me know if you still have trouble after that.

The Expression Guru