Open Bug 1936022 Opened 1 year ago Updated 2 months ago

An embedded SVG image (for example in a signature) is displayed as broken image when option "Display Attachments Inline" is turned off

Categories

(Thunderbird :: Message Reader UI, defect)

45 Branch
defect

Tracking

(Not tracked)

People

(Reporter: dev, Unassigned)

References

Details

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Steps to reproduce:

I created a new signature for Thunderbird in HTML, inserting an image tag with the src attribute containing an SVG converted to Base64. (Current version: 128.5.1esr)

Actual results:

While composing the email, the signature is displayed correctly with the image. However, once sent, the recipient sees the ALT attribute of the image instead of the image itself.

Expected results:

The image should be displayed correctly instead of showing the alt attribute (if specified). I have several clients with HTML signatures containing their logo in SVG format encoded in Base64, which have stopped working. I noticed that if the image is in PNG format (also encoded in Base64), it is correctly displayed by the recipient.

Can you attach a sample message (from your sent folder) as .eml?

Attached file test.eml

Email example.

Is the recipient also using Thunderbird?

(In reply to Robert Longson [:longsonr] from comment #3)

Is the recipient also using Thunderbird?

Yes, the recipient uses Thunderbird and has the same version as me. He is a colleague of mine. We noticed this bug when a client sent us an email (addressed to both of us). We conducted some internal tests in the office, using the client’s signature that we had previously created, and we observed that the display error for the Base64-encoded logo occurs only when the file is in SVG format. The problem does not occur with images in JPG or PNG format. Before delivering the signature to the client, about a month ago, we performed several tests, both in the office and with the client, and no issues emerged: the logo was displayed correctly.

What is the issue? The test message displays correctly? Can you attach a screenshot of what you consider to be the problem. Sorry if I'm missing something.

Attached image screenshot.jpeg

Here is the evidence of the issue. The logo is not displayed, as if the image does not exist, and in its place (as it should), the ALT attribute is displayed.

Flags: needinfo?(francesco)
Attachment #9442659 - Attachment is patch: false
Attachment #9442659 - Attachment mime type: text/plain → image/jpeg

were you using the same version of thunderbird when you performed the tests a month ago? If not then you could use https://mozilla.github.io/mozregression/ to see if something has changed between the old version and the current version that has broken things.

If you were using the same version then something has changed on your end e.g. your mail server and we can't fix that.

Attached image 1936022.png

The message displays fine here. Since the logo is actually present in the message and not loaded from a http(s) location, I don't see why this wouldn't display correctly. Are you using any add-ons? Any other circumstances that could explain the "effect" you're seeing?

Flags: needinfo?(francesco)

The images with the logo have been converted to base64 from a PNG file, while those without the logo come from SVG images. Until about a month ago, base64 images derived from SVG files were displayed correctly by both the sender and the recipient. I'm not sure if any minor updates have been released recently, but now base64 images from SVG files are no longer displayed correctly by the recipient (using my version of Thunderbird). I fixed the issue by replacing the SVG image with a PNG file. If anyone encounters the same problem, I recommend this solution. This post is purely informational for those who might find themselves in the same situation. (No add-ons installed.)

(In reply to Filippo from comment #2)

Created attachment 9442616 [details]
test.eml

I can confirm the bug when I move the email to a local folder.
The DOM-Inspector says: "Could not load the image"

However, if I move it to an IMAP folder, the SVG is displayed correctly.

That reminds me of Bug 1883928. But there it's the other way around. The bug occurs with IMAP, but not in local folders.

(1(1¢)

(In reply to Alfred Peters [:infofrommozilla] from comment #10)

I can confirm the bug when I move the email to a local folder.

Displays fine from a local folder here, screenshot attached in comment #8. Tested in 128 and current beta 134.

(In reply to Francesco from comment #12)

Displays fine from a local folder here, screenshot attached in comment #8.

Hmm, which OS? For Filippo (as per comment 0 1) and me, it's Windows.

Tested in 128 and current beta 134.

TB128 and Daily show the same behavior here..

Hmm, which OS?

Windows 10. Does it matter? Mozilla have their own code for displaying SVG.

(In reply to Francesco from comment #14)

Hmm, which OS?

Windows 10. Does it matter?

There must be a difference. That's what I'm looking for.

Mozilla have their own code for displaying SVG.

Displaying is not the problem.

As I wrote in comment 3, the DOM-Inspector says: "Could not load the image"

Maybe a problem with the URI(?) path?

(In reply to Alfred Peters [:infofrommozilla] from comment #15)

There must be a difference. That's what I'm looking for.

Please excuse me, I tricked myself with two profiles.
The difference is simple, whether “Display Attachments Inline” is activated or not.

But why does this affect SVGs but not JPG images?

Attached image Bug1936022_DOMI_svg.png

And why does DOMI report "Could not load the image"?

I can confirm that toggling "Display Attachments Inline" shows/hides the SVG.

But why does this affect SVGs but not JPG images?
And why does DOMI report "Could not load the image"?

That's the bug, right? I tried a few versions back, the behaviour is the same right down to TB 45. No one ever noticed.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Thunderbird 128 → 45 Branch
Component: Untriaged → Message Reader UI
See Also: → 2005871
Duplicate of this bug: 2005871

Simple sample message in bug 2005871, attachment 9532844 [details].

See Also: 2005871
Summary: Problem with Base64-encoded SVG images → An embedded SVG image (for example in a signature) is displayed as broken image when option "Display Attachments Inline" is turned off
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: