Remove inline image - plain text trick doesn't work

User Help for Mozilla Thunderbird
Post Reply
User avatar
OsakaWebbie
Posts: 163
Joined: November 16th, 2004, 5:09 am
Location: Osaka, Japan

Remove inline image - plain text trick doesn't work

Post by OsakaWebbie »

I'm already aware of the trick of View -> Message Body As -> Plain Text in order to remove inline images. That has worked in the past, but now I have a message that behaves differently, and I don't know what to do.

When I switch to Plain Text, the place where the huge but unwanted image was showing changes to this:

Code: Select all

[cid:1d8f475c-23d8-4743-aaec-1db84c681f2d]
There is no attached file. The "cid..." bit is a link:

Code: Select all

mailbox:///C:/PortableStuff/PortableApps/ThunderbirdPortable/Data/profile/Mail/Local%20Folders/Inbox?number=26415&part=1.2&filename=DSC00126.JPG
I thought that meant there would be a file in my profile named DSC00126.JPG that I could just delete, but there is no such file.

Thanks in advance for any clues. I know I could forward the message to myself and remove the image, but it would be nicer to learn a way to deal with it in incoming messages.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Remove inline image - plain text trick doesn't work

Post by tanstaafl »

It might refer to a embedded image stored in another MIME section, after the message body. The filename the image originally came from is mentioned in the headers, but its not an attachment. For example, I have a HTML message with a embedded image that uses

<img alt="" src="cid:part1.09020004.05030809@yahoo.com height="1200" width="1600">"

in the message body to refer to the embedded image at :

--------------070407040009020807040302
Content-Type: image/jpeg;
name="58919_1600x1200-wallpaper-cb1346964996.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part1.09020004.05030809@yahoo.com>
Content-Disposition: inline;
filename="58919_1600x1200-wallpaper-cb1346964996.jpg"

/9j/4R2sRXhpZgAASUkqAAgAAAAOAAABAwABAAAAQAYAAAEBAwABAAAA6wQAAAIBAwADAAAA
tgAAAAMBAwABAAAAAQAAAAYBAwABAAAAAgAAABIBAwABAAAAAQAAABUBAwABAAAAAwAAABoB
BQABAAAAvAAAABsBBQABAAAAxAAAABwBAwABAAAAAQAAACgBAwABAAAAAgAAADEBAgAgAAA

..... (the big block of characters is the actual image data, base64 encoded)

If you're running into something else it would help to also see the HTML statement that references the cid, and a few of the neighboring lines above and below the reference to the mailbox. I normally see a mailbox reference only in the properties (in the folder pane) for a mbox file such as the inbox in Local Folders :

mailbox:///C:/Users/Eric/AppData/Roaming/Thunderbird/Profiles/feu8hx1l.default-release/Mail/Local Folders/Inbox
User avatar
OsakaWebbie
Posts: 163
Joined: November 16th, 2004, 5:09 am
Location: Osaka, Japan

Re: Remove inline image - plain text trick doesn't work

Post by OsakaWebbie »

Yup, you're right - it's in a MIME section. For some mysterious reason, when I look at the source code, both the plain text version and HTML version of the message are not normal text but base64-encoded "binary", so I can't even see the HTML context. Here are the only "readable" parts of the message after the header:

Code: Select all

     (the last of the header)
X-Antivirus-Status: Clean

--_004_OSAPR01MB37770E1695AE4332A417C3C9A7930OSAPR01MB3777jpnp_
Content-Type: multipart/alternative;
	boundary="_000_OSAPR01MB37770E1695AE4332A417C3C9A7930OSAPR01MB3777jpnp_"

--_000_OSAPR01MB37770E1695AE4332A417C3C9A7930OSAPR01MB3777jpnp_
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

SGVsbG8gRGFuICYgS2FyZW4sDQoNCltjaWQ6MWQ4ZjQ3NWMtMjNkOC00NzQzLWFhZWMtMWRiODRj
     (continues like this)
d2hhdCBpcyBuZXh0Pw0KDQpNaWNoYWVsIExpbmRuZXINCg0KDQoNCg0KDQoNCg0KDQo=

--_000_OSAPR01MB37770E1695AE4332A417C3C9A7930OSAPR01MB3777jpnp_
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64

PGh0bWw+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0i
     (continues like this)
ZTogMTJwdDsgY29sb3I6IHJnYigwLCAwLCAwKTsiPg0KPGJyPg0KPC9kaXY+DQo8L2JvZHk+DQo8
L2h0bWw+DQo=

--_000_OSAPR01MB37770E1695AE4332A417C3C9A7930OSAPR01MB3777jpnp_--

--_004_OSAPR01MB37770E1695AE4332A417C3C9A7930OSAPR01MB3777jpnp_
Content-Type: image/jpeg; name="DSC00126.JPG"
Content-Description: DSC00126.JPG
Content-Disposition: inline; filename="DSC00126.JPG"; size=5876143;
	creation-date="Fri, 26 Jun 2020 04:56:09 GMT";
	modification-date="Fri, 26 Jun 2020 04:56:10 GMT"
Content-ID: <1d8f475c-23d8-4743-aaec-1db84c681f2d>
Content-Transfer-Encoding: base64

/9j/4ZnYRXhpZgAASUkqAAgAAAAMAA4BAgAgAAAAngAAAA8BAgAFAAAAvgAAABABAgAKAAAAxAAA
     (continues a VERY long time - this message was 7.7MB due to this one photo of a pet rabbit)
R1JXaf2jwPwf46uPDGuiKTbOrKTayk4LKP4S3VgOxNeneIvE1zqN/DezSaWtlNJ5ciM6RgAkAspz
85yeSauUWgi7yuz/2Q==

--_004_OSAPR01MB37770E1695AE4332A417C3C9A7930OSAPR01MB3777jpnp_--
User avatar
OsakaWebbie
Posts: 163
Joined: November 16th, 2004, 5:09 am
Location: Osaka, Japan

Re: Remove inline image - plain text trick doesn't work

Post by OsakaWebbie »

I just now ran across another message that doesn't cooperate, with different behavior. Someone had written in Apple Mail and embedded a photo (frustratingly, Apple Mail codes all attachments as inline), and then my husband had replied in Thunderbird, with me in BCC. The original Apple Mail message works okay - when I switch to plain text, the inline image becomes an attached file. But what I want to save is my husband's reply - when I view that message as plain text, there is neither an attachment nor a link visible!

Here is the img tag with some context in both messages (through the beginning of the image data). First, here is what it looks like in the original:

Code: Select all

<div =
class=3D"">Carl</div></div><img height=3D"601" width=3D"901" =
apple-width=3D"yes" apple-height=3D"yes" apple-inline=3D"yes" =
id=3D"13CC436E-AFC4-410B-8227-887415F82111" =
src=3D"cid:8A5D607A-DC67-40C8-800E-6A9C739FEE4D@hsd1.mn.comcast.net." =
class=3D""><br class=3D""><br class=3D""><div =
apple-content-edited=3D"true" class=3D"">
Carl HolyLandPhotos<br class=3D""><a =
href=3D"mailto:footstepstours@comcast.net" =
class=3D"">footstepstours@comcast.net</a><br=
 class=3D"">

</div>
<br class=3D""></body></html>=

--Apple-Mail=_0DE53D66-D8BD-4506-ABBF-A5282395EB6B
Content-Transfer-Encoding: base64
Content-Disposition: inline;
	filename=DanAndKaren01.jpg
Content-Type: image/jpeg;
	x-unix-mode=0644;
	name="DanAndKaren01.jpg"
Content-Id: <8A5D607A-DC67-40C8-800E-6A9C739FEE4D@hsd1.mn.comcast.net.>

/9j/4QCKRXhpZgAASUkqAAgAAAAFABoBBQABAAAASgAAABsBBQABAAAAUgAAACgBAwABAAAAAgAA
When replying, Thunderbird naturally put the original message inside a blockquote tag:

Code: Select all

    <blockquote
      cite="mid:3CB36F2B-C068-44A3-94D9-7CD03CDB0391@comcast.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
(snip early part of message)
        <div class="">Carl</div>
      </div>
      <img apple-width="yes" apple-height="yes" apple-inline="yes"
        id="13CC436E-AFC4-410B-8227-887415F82111"
        src="cid:part1.665FA0A5.7D84F039@proverbs2525.org" class=""
        height="601" width="901"><br class="">
      <br class="">
      <div apple-content-edited="true" class="">
        Carl HolyLandPhotos<br class="">
        <a moz-do-not-send="true"
          href="mailto:footstepstours@comcast.net" class="">footstepstours@comcast.net</a><br
          class="">
      </div>
      <br class="">
    </blockquote>
    <br>
  </body>
</html>

--------------1EE674B4CF76FED59FEF32E5
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-ID: <part1.665FA0A5.7D84F039@proverbs2525.org>

/9j/4QCKRXhpZgAASUkqAAgAAAAFABoBBQABAAAASgAAABsBBQABAAAAUgAAACgBAwABAAAA
Key differences are the blockquote wrapper and the lack of Content-Disposition and filename for the photo. Would either of those changes cause the "trick" not to work?
Post Reply