how to put an image in an HTML signature for Thunderbird?

0

0

How do I get thunderbird to send HTML and an image in a signature?

Just wanting to send a red dot in the signature file for as an example.

see also:

https://stackoverflow.com/q/44481019/262852

Thufir

Posted 2017-06-11T05:08:50.190

Reputation: 876

forgot to enable HTML messages as per: https://askubuntu.com/questions/100797/how-do-i-configure-thunderbird-to-send-plain-text-emails-by-default

– Thufir – 2017-06-11T08:52:50.613

Answers

4

The url of the img is only valid to your computer and it is not valid at the receiver side. So you need to encode the image file using a base64 encoder like this one.

Upload the signature and convert it into base64.

Copy the code and replace the path in img tag with the code like this.

<br><img src="data:image/bmp;base64,Qk32BgAAAAAA...." alt="Signature">

Hope this helps.

CodeIt

Posted 2017-06-11T05:08:50.190

Reputation: 1 485

I updated the question a bit. Need to use src="data:...." ? Don't want to include the file itself directly. – Thufir – 2017-06-11T05:36:52.223

@Thufir If your are not ready to include file itself directly then the image will only be visible to you. Others won't be able to see your image. For that you need to embed the image and send. – CodeIt – 2017-06-11T05:39:33.790

what I mean is I'd like to use file:///whatever instead of directly pasting the data. I wrote incorrectly about including the file directly. Of course I want to include the file, but would want to refer by file name and path. is that possible? – Thufir – 2017-06-11T05:43:05.153

1@Thufir Does your email recipient have access to this path? If not then they won't be able to see this file. For them you must embed the image and send or serve from your website or public server – CodeIt – 2017-06-11T05:52:20.213

ohhhhhh, that's weird, didn't think of that. thx. – Thufir – 2017-06-11T05:55:11.737

@Thufir If this answers you question. Mark as answer. – CodeIt – 2017-06-11T05:55:52.460

Let us continue this discussion in chat.

– Thufir – 2017-06-11T06:07:18.567

Images inserted like this are not visible in gmail for example. With how widespread gmail is this cannot be an acceptable answer. – David162795 – 2018-08-30T14:10:02.363

0

syntax is fine:

thufir@doge:~$ 
thufir@doge:~$ cat .tbird/sig.html

this is in <i>italics</i>
<br>
and something <em>emphasized</em>
<br>
here's some <b>bold</b>

<br>
<br>
<br>

<img moz-do-not-send="false" src="data:image/png;base64,
iVBORw0KGgoAAA
ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4
//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU
5ErkJggg==" 

style="height:22px; width:22px"
alt="Signature"/>

thufir@doge:~$ 

forgot to enable HTML e-mail:

https://askubuntu.com/q/100797/45156

copied in reference from:

https://stackoverflow.com/a/44482049/262852

Thufir

Posted 2017-06-11T05:08:50.190

Reputation: 876

1Images inserted like this are not visible in gmail for example. With how widespread gmail is this cannot be an acceptable answer. – David162795 – 2018-08-30T14:10:23.607

how does gmail handle inserted images, then? – Thufir – 2018-09-10T21:11:23.307

It basically removes src attribut out of html (if it contains such inline data instead of http*) before displaying message, and the <img> image without it is displayed as if it had broken url. – David162795 – 2018-09-11T11:02:52.307