Ignores embedded images references (aka cid) in CSS style sheets



15 years ago
6 months ago


(Reporter: hugo, Unassigned)


(Depends on: 1 bug)

Bug Flags:
wanted-thunderbird3 ?

Firefox Tracking Flags

(Not tracked)



(2 attachments, 1 obsolete attachment)



15 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Build Identifier: 

I uploaded the email file to:

The line 48:
background-image: url(cid:108740906140d08ba5e205f);

Is ignored by Thunderbird, its render ok in Outlook, see the email file and see 
the bug.

Reproducible: Always
Steps to Reproduce:
1. Open any email with embebed imagens references in CSS
Actual Results:  
The image is ignored.

Expected Results:  
Show the image

Comment 1

14 years ago
I have noticed this as well. We generated a HTML email with a <div id="someid">.
The HTML contained the CSS in the <head> section, which gave the <div> a
background image (which was encoded as a Mime attachment). The email was
received and displayed fine by Mac Entourage and Windows Outlook, but would not
display the background image in Linux Thunderbird.


Comment 2

14 years ago
That's a rather old Mozilla bug. It also doesn't work for common 
elements, such as tables etc. 

Interestingly, Thunderbird

- Can take a background color from from a style definition in the 
  mail body, so it can read css definitions,

- Can display a background image if given as a parameter, e.g. 
  for the BODY tag.

So it should not be too much work to teach thunderbird displaying 
background images in HTML-E-mail-CSS

Comment 3

14 years ago
I'm glad i ran across this bug, i've been hitting my head against this since I'm
just learning how to use MIME and base64 encoding in an email. TB is my primary
client and I couldn't for the life of me get this work, but since i know its TB
only i'll just reference with a cid and know it will work in OE and webmail
clients. And of course vote for this bug and hope it gets fixed.

Comment 4

13 years ago
The sample file is no longer available at the cited URL.  If the message is still available, please attach it (as a .EML file) to this bug, using the 
Create New Attachment link above.
Summary: Ignore embebed images references (aka cid) in CSS style sheets → Ignores embedded images references (aka cid) in CSS style sheets

Comment 5

13 years ago
Created attachment 219168 [details]
HTML mail with images, both in CSS and in <IMG> tags

This mail shows Thunderbird reads the embedded style sheet, renders images inserted with IMG tag but ignores backgrounds set by css attribute.

Comment 6

13 years ago
Thanks for the test case.  (There is an error in there -- two <div>'s have the ID "evid" -- but that shouldn't affect this bug.)

To other testers: the background images should be seen in the left-hand column of the message.  That column is made of up three divs, stacked top-to-bottom: two with id "evid" and one with class "basso".  Each of these has three <div>s of its own, also top-to-bottom, and each of those <div>s has a background-image specified in the stylesheet.

Note that there are also some embedded <img> tags.  If you open the attachment via  File|Open   TB 1.5/Seamonkey 1.0 or earlier, those images won't display (due to bug 206278, I think) but they'll show with 1.8.1 or later builds.
Version: unspecified → Trunk
QA Contact: front-end

Comment 7

11 years ago
Can we up the severity of this or mark it at least as wanted for TB3?  This bug is almost 4 years old and very frustrating.  The only solution I've found is to use an external URL for any CSS image backgrounds, which of course doesn't get loaded automatically, and most users see as a security risk.

TB does display e.g. <table background="cid:x"> correctly, but I don't consider this a valid workaround since this is not truly valid in any version of HTML.
Flags: wanted-thunderbird3?
Assignee: mscott → nobody


10 years ago
Depends on: 264270

Comment 8

10 years ago
I support Ryan Hayle proposal: this bug should really be solved! :)

Comment 9

10 years ago
Am I doing something wrong?

I see the same result when opening the .eml with either MS outlook2007, Windows Mail (Vista) or latest tb3.1a1pre nightlies.

Is it fixed in these builds perhaps?

Comment 10

10 years ago
Can you people post a screenshot of when should be displayed please?

Comment 11

10 years ago
Created attachment 369044 [details]
HTML mail with images in CSS bg and IMG tags, with valid code

Complete email without the errors in html the previous attachment had.
Attachment #219168 - Attachment is obsolete: true

Comment 12

10 years ago
Created attachment 369045 [details]
Screenshot of HTML mail with images in CSS bg and IMG tags, with valid code

Screenshot of correct visualization of the previous attachment

Comment 13

10 years ago
Yep! as I thought... this is fixed in 3.0b2 and 3.1a1 that I've tested it with.

Which version are you using at the moment & seeing this bug in?

Comment 14

10 years ago
I'm using TB (20090302) and the bug is still there.

Comment 15

10 years ago
Ok, then this seems as a 2.x version bug and should be noted as such (owner of this bug should change its state).

Manuele, I suggest you move to 3.x if this bug is really bothering you and if most of your extensions are compatible. I've been using it since its early alpha states without any serious issues (no data loss whatsoever) and for a few weeks now I've moved to 3.1 alphas... still very happy with it!

Plus you'll have the chance to help testing the new features or suggest some yourself and perhaps spot and report new bugs.

Comment 16

10 years ago
Sorry but where can tb 3.1a1 be found for download?

Comment 17

10 years ago
here you can find 3.0b2 in different languages:


and here are 3.1alpha builds, but only in english versions:

Still broken pictures using (tested the .eml file https://bugzilla.mozilla.org/attachment.cgi?id=369045)
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b4pre) Gecko/20090404 Lightning/1.0pre Shredder/3.0b3pre

Comment 19

10 years ago
does not work. 
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2

MIME-Version: 1.0
Content-Type: multipart/related; 

Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml"><body>
	<div style="background-image:url(cid:image1@image); width:100px; height: 100px;"></div>

Content-Type: image/png; name=img.png
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename=img.png
Content-ID: <image1@image>


Comment 20

8 years ago
The problem still exists in TB 3.1.7 . I use the method proposed in the last message of the webpage " http://forums.mozillazine.org/viewtopic.php?f=31&t=578408 " as a workaround. ( ...... My code, to apply a background image to any table with "class=backgroundTable" now worked. With the <!-- and //--> comment tags, it is:

<style type="text/css">
.backgroundTable { background-image: url(http://airborn.com.au/image1/sky1.gif); }

So in summary, if you are having problems with css images not working when emailing from thunderbird, alter your css to wrap your style rules in <!-- and //--> comment tags. ) Please help to recheck this problem and fix it. Thank you.

Comment 21

6 years ago
not working in TB 14 either with cid inline background images.

can somebody please invest some time to fix this? you would make a lot of people VERY VERY happy!!!

Comment 22

5 years ago
Still not working correctly in TB 24... :(

Comment 23

5 years ago
Using 24.2.0 still not working. Is there any workaround?

Comment 24

4 years ago
2015, and this is still not working in Thunderbird 31  :-(

Comment 25

3 years ago
It's annoying. Thunderbird seems to be the only mail client that cannot render background images. 11 years and still in the pipeline.

Comment 26

3 years ago
(In reply to Gunar Werner from comment #25)
> It's annoying. Thunderbird seems to be the only mail client that cannot
> render background images. 11 years and still in the pipeline.

definitely not the only one as many companies still use old software:

Comment 27

2 years ago
Still present in 45.3.0.

Comment 28

6 months ago
Still present in 57.7.0...

Comment 29

6 months ago
Sorry, was meaning 52.7.0!
You need to log in before you can comment on or make changes to this bug.