Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

Firefox copies images into clipboard in a weird format?

  • 5 uphendule
  • 3 zinale nkinga
  • 2 views
  • Igcine ukuphendulwa ngu borekb

more options

When I right-click on PNG or JPG image inside some webpage and select "Copy Image", I have a feeling that it gets stored in some "weird" format in my Windows clipboard. I say that because when I simply do Ctrl+V in Twitter or Slack, it should paste the image but it doesn't. I need to open something like Paint, paste there, then do Ctrl+C again and now pasting into Twitter or Slack in Firefox works. Really the only explanation I have is there's something funky about the clipboard storage format used by Firefox. Or what could it be?

When I right-click on PNG or JPG image inside some webpage and select "Copy Image", I have a feeling that it gets stored in some "weird" format in my Windows clipboard. I say that because when I simply do Ctrl+V in Twitter or Slack, it should paste the image but it doesn't. I need to open something like Paint, paste there, then do Ctrl+C again and now pasting into Twitter or Slack in Firefox works. Really the only explanation I have is there's something funky about the clipboard storage format used by Firefox. Or what could it be?

All Replies (5)

more options

I'm waiting for a password reset on Twitter so I can't test at the moment...

Do you recall having this issue in Firefox 43 or 44? There have been some clipboard changes recently, with Firefox 44 removing legacy formats and Firefox 45 expected to undo that change. Somewhere in there, something might have happened regarding images.

more options

I'm not quite sure, honestly. I think I've had this problem for a couple of months now but I may be wrong. BTW I am on Firefox 45.0b6.

more options

You can use code like this in the Browser Console to check if a specific MIME type is on the clipboard.

  • Services.clipboard.hasDataMatchingFlavors(["image/png"], 1, clipboard.kGlobalClipboard);
  • Services.clipboard.hasDataMatchingFlavors(["image/jpg"], 1, clipboard.kGlobalClipboard);

See also:

more options

A long time ago, in Firefox 12, Firefox starting including a HTML link on the clipboard when you Copy Image. This was to facilitate easy image embedding in Gmail messages.

When I paste into Twitter, nothing seems to happen, but if I rapidly repeat pressing Ctrl+v I can see the image occasionally added and removed, as though Twitter is receiving, rendering, and rejecting the HTML format. It kind of makes sense that Firefox is giving Twitter the HTML.

So far, no workarounds have come to mind...

more options

@jscher2000 That is great info, thanks. I've installed this clipboard viewer and indeed, there's "HTML Format" entry with this contents:

Version:0.9 StartHTML:00000097 EndHTML:00000343 StartFragment:00000131 EndFragment:00000307 <html><body> <!--StartFragment--><img style="MARGIN-TOP: 0.5em; MARGIN-LEFT: 0.5em" alt="Windows Clipboard Viewer" src="http://www.freeclipboardviewer.com/images/windowsclipboard.png" height="372" width="450"><!--EndFragment--> </body> </html>

Then, there's a couple of image formats:

http://snag.gy/lc6YB.jpg

I agree that it does make sense to include the HTML into the copied data so maybe it's a paste problem? Like, in Twitter, paste is actually broken?

(However, I've just tried the same in Chrome and it behaves the same, i.e., paste doesn't work, and when I right-click and "Copy Image" in Chrome, it also stores a similar piece of HTML into the clipboard.)

This is really unpleasant from the user perspective - I have an image in my clipboard, the paste should just work.

Okulungisiwe ngu borekb