Cannot copy and paste an inline image

User Help for Mozilla Thunderbird
Post Reply
John_Ha
Posts: 111
Joined: August 22nd, 2008, 2:56 am

Cannot copy and paste an inline image

Post by John_Ha »

Thunderbird does not copy inline images with Edit > copy (or ctrl/c)

I have an email with some text, then an in-line image, then some more text.
I highlight everything - the first bit of text, the image, the second bit of text, and copy it.
I paste it into another email I am writing, expecting both text and image to be copied.

Two errors:

1 The image does not get pasted - it appears as a blank image placeholder box
2 I cannot save the new email as a draft - I get an error message "Unable to save your message as draft. There was an error attaching. Please check if you have access to the file"

I have read elsewhere that it might be because TB does not copy the full HTML related to the image to the clipboard. When I double-click on the image placeholder box I get an Image Properties window which says the Image location is mailbox:///C%7C/Users/John/AppData/Roaming/Thunderbird/Profiles/xxxxxxxxx.default/Mail/Local%20Folders/Inbox?number=nnnnnnnn&part=1.2&filename=Picture.jpg (I have obscured my private details)

The image is obviously present in the email, not least because I can see it, but also because if I R-click, I can Copy Image or Save Image As.

Is this a known bug or should I report it?
User avatar
DanRaisch
Moderator
Posts: 127228
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Cannot copy and paste an inline image

Post by DanRaisch »

Moving to Thunderbird Support.

Is the image in the original email stored on your local system or is it stored remotely but displayed in the message? Did you send the original message or was it sent to you?
John_Ha
Posts: 111
Joined: August 22nd, 2008, 2:56 am

Re: Cannot copy and paste an inline image

Post by John_Ha »

Dan

Thank you for your response. I get the problem both with emails I create, and also with emails I receive.

In order to get reproduceable testing, I created an email myself, and inserted an in-line image from my hard drive, and sent the email to me. I opened the received email and could not copy the image as described. I also could not copy the image from the Saved email.

> Is the image in the original email stored on your local system.

Yes, I still have Picture.jpg stored in My Pictures on my hard disk.

But note that the image properties in the placeholder box refer to the Thunderbird folders - namely mailbox:///C%7C/Users/John/AppData/Roaming/Thunderbird/Profiles/xxxxxxxxx.default/Mail/Local%20Folders/Inbox?number=nnnnnnnn&part=1.2&filename=Picture.jpg. I navigated to C:/Users/John/AppData/Roaming/Thunderbird/Profiles/xxxxxxxxx.default/Mail/Local%20Folders/ and I can see the Inbox and Inbox.msf files.

> or is it stored remotely but displayed in the message

As I sent the email to myself, then image is coded into the email. It is not a "link". These are the headers, and I believe the last lines are the first lines of the JPG file.

Code: Select all

From: John xxxx <xxxxx@xxxxx.xxx>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: John xxxx <xxxxx@xxxxx.xxx>
Subject: Test of in line image
Content-Type: multipart/related;
   boundary="------------000602060606070801060509"
X-me-spamlevel: not-spam
X-me-spamrating: 44.040405
X-me-spamcause: OK, (20)(0000)gggruggvucftvghtrhhoucdtuddrfedufedrudejgddvhedufecuteggodetufdouefnucfrrhhofhhilhgvmecuoffgnecuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdlvddtmd
X-Antivirus: AVG for E-mail 10.0.1204 [1435/3466]
X-AVG-ID: ID7F356F39-7668AF3A


This is a multi-part message in MIME format.
--------------000602060606070801060509
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    First line of text above the image.&nbsp; Now insert My
    Pictures/Picture.jpg using Insert &gt; Image and navigate to it<br>
    <img alt="Image"
      src="cid:part1.00000202.02080801@xxxx.xxxx.xxx"
      width="480" height="640"><br>
    Second line of text below the inserted image<br>
 

<br>
<br>
</body>
<hr noshade="noshade" size="1"><p class="avgcert" align="left" color="#000000">No virus found in this message.<br>
Checked by AVG - <a href='http://www.avg.com'>www.avg.com</a><br>
Version: 10.0.1204 / Virus Database: 1435/3466 - Release Date: 02/24/11</p></html>

--------------000602060606070801060509
Content-Type: image/jpeg;
 name="Picture.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part1.00000202.02080801@xxxx.xxxx.xxx
Content-Disposition: inline;
 filename="Picture.jpg"

/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQY
GBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYa
KCgoKCgoKCgoK ...
...
... etc for many lines - I am pretty sure this is the picture file



> Did you send the original message or was it sent to you?

In this test, I sent the email to me. I get the same problem if someone else (also using TB) sends me an email.
rsx11m
Moderator
Posts: 14404
Joined: May 3rd, 2007, 7:40 am
Location: US

Re: Cannot copy and paste an inline image

Post by rsx11m »

mailbox:///C%7C/...

This is a known bug on Windows platforms due to the "C:" drive-letter encoding. Thunderbird double-escapes ("%xx") special characters for some reason when copy-pasting images. Go into the image properties and change the "%7C" to "|" (vertical bar) or ":" (colon), then it should work.
John_Ha
Posts: 111
Joined: August 22nd, 2008, 2:56 am

Re: Cannot copy and paste an inline image

Post by John_Ha »

rsx11m

Thank you.

You are absolutely correct - when I changed "C%7C/Users" to "C:/Users" the image appeared.

I will wait for the fix...
rsx11m
Moderator
Posts: 14404
Joined: May 3rd, 2007, 7:40 am
Location: US

Re: Cannot copy and paste an inline image

Post by rsx11m »

You are welcome. There is unfortunately not much action in that bug report, those lower-level libraries for content handling are apparently in part ancient and nobody seems quite comfortable approaching these bugs.
awesomen
Guest

Re: Cannot copy and paste an inline image

Post by awesomen »

I already have C:/User in the property of my images, but cannot paste images into emails. I have Win 7, Yahoo. Also when I receive emails with attached image no option to download it, and if I "save as" it is very small, although the person sending it previously pasted it in her email and it was large. I DO get option to download more than one attchmt sent. Now what? Thanks for any help.
Terra*
Guest

Re: Cannot copy and paste an inline image

Post by Terra* »

Just out of curiosity, I wonder if you're using "insert". I can't copy/paste images either, in most cases, but if I save the image in a separate file, and then use "insert", I can get just about anything to load up into the message. Cumbersome. But then again, I'm boring and don't use many images.

Terra
rsx11m
Moderator
Posts: 14404
Joined: May 3rd, 2007, 7:40 am
Location: US

Re: Cannot copy and paste an inline image

Post by rsx11m »

I already have C:/User in the property of my images, but cannot paste images into emails.

Are you talking about copy-pasting an image from one message to another, i.e., within Thunderbird? In that case, you have to go into the Image Properties dialog after pasting and correct the path as described.

I can't copy/paste images either, in most cases, but if I save the image in a separate file, and then use "insert"

The clipboard handling is complex, and depending on from which application you try to copy images from, it may or may not work. As a workaround avoiding to save as a file, you can copy from the source application first, then open MS Paint and paste it there first; in a second step, select the whole image in MS Paint and copy it to the clipboard, then paste it into the message you compose in Thunderbird. This usually works for me when pasting from another application doesn't produce anything or an empty image box.
Post Reply