We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Funkcionalnosć tutoho sydła so přez wothladowanske dźěła wobmjezuje, kotrež maja waše dožiwjenje polěpšić. Jeli nastawk waš problem njerozrisuje a chceće prašenje stajić, wobroćće so na naše zhromodźenstwo pomocy, kotrež na to čaka, wam na @FirefoxSupport na Twitter a /r/firefox na Reddit pomhać.

Pomoc přepytać

Hladajće so wobšudstwa pomocy. Njenamołwimy was ženje, telefonowe čisło zawołać, SMS pósłać abo wosobinske informacije přeradźić. Prošu zdźělće podhladnu aktiwitu z pomocu nastajenja „Znjewužiwanje zdźělić“.

Dalše informacije

Firefox copies images into clipboard in a weird format?

  • 5 wotmołwy
  • 3 maja tutón problem
  • 14 napohladow
  • Poslednja wotmołwa wot 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?

Wšě wotmołwy (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.

Wot borekb změnjeny