# Firefox has quirky copy/paste image behavior

**URL:** https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345
**Category:** Feature
**Created:** [February 10, 2016, 4:42pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345 "2016-02-10T16:42:52Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [February 10, 2016, 4:42pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/1 "2016-02-10T16:42:52Z")

</div>

How to repro. Firefox Only (latest)

1. Open any image from imgur/imageshack etc..
2. Copy Image. **(Do not copy image URL/Just copy image)**
3. Paste the image on your latest upgraded Discourse community, Instead of uploading the image, the link of the image gets copied.

_On Chrome you get the image uploaded to the community. Firefox latest image upload does not take place._

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 10, 2016, 6:44pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/4 "2016-02-10T18:44:30Z")

</div>

When I right-click “Copy Image” using Firefox, it does not enable the right-click paste option.

But control-v works

![](https://global.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/45/33491_1.png)

I’ve always thought it was a Firefox issue (i.e. clipboard), _not_ a Discourse issue

Copy - Paste text works fine.

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [February 10, 2016, 6:51pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/5 "2016-02-10T18:51:21Z")

</div>

> [@Mittineague](#):
>
> When I right-click “Copy Image” using Firefox, it does not enable the right-click paste option.
> 
> But control-v works
> 
> I’ve always thought it was a Firefox issue (i.e. clipboard), not a Discourse issue

Control + V works to paste the image, that’s what i have been doing and i loved this feature it was awesome and time saving.

But it just copies the image url, not upload it. For example try pasting this image below  
`https://i.imgur.com/1Cw4eDI.jpg`

The result would be

`<img src='https://i.imgur.com/1Cw4eDI.jpg'>`

As you can see it did copy the image URL, Instead of uploading the image. (On chrome it uploads the image to the discourse)

Edit - Sorry about my English.

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [February 10, 2016, 6:53pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/6 "2016-02-10T18:53:59Z")

</div>

Pretty sure this is by design. Firefox image pasting looks pretty difficult to deal with, so this is the team’s best effort. See the relevant comment in the code here:

> <https://github.com/discourse/discourse/blob/3df2ee343154e78f8490a418df08656323c993b0/app/assets/javascripts/discourse/components/composer-editor.js.es6#L276>

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [February 12, 2016, 5:32pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/7 "2016-02-12T17:32:06Z")

</div>

Right-click “copy image” followed by Ctrl+V pasting works fine for me on Firefox. (44.0.2 on Ubuntu Gnome 15.10).

However, as of this afternoon, I no longer seem to be able to use drag-and-drop image upload in Firefox, either here or on SitePoint. Firefox updated this morning, so that’s probably when the change occurred.

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [February 12, 2016, 6:23pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/8 "2016-02-12T18:23:06Z")

</div>

it did not work because the image you posted was not uploaded to [meta.discourse.org](http://meta.discourse.org)  
`https://pixabay.com/static/uploads/photo/2016/01/30/17/41/africa-1170108_960_720.jpg`  
This is the image link.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [February 12, 2016, 6:37pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/9 "2016-02-12T18:37:29Z")

</div>

My apologies - I had misunderstood the issue.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 12, 2016, 9:11pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/10 "2016-02-12T21:11:22Z")

</div>

@eviltrout can you check next week and make sure we didn’t have any regressions here?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 16, 2016, 8:04pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/11 "2016-02-16T20:04:58Z")

</div>

I tried on the latest Firefox on [try.discourse.org](http://try.discourse.org) and it seems to be working fine? Perhaps it’s an issue with the particular image that was tried.

 ![](https://global.discourse-cdn.com/meta/original/3X/1/e/1e8979b9144780ed3ce7d2212c7aaf61bf14d58b.png)

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [February 18, 2016, 5:32pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/12 "2016-02-18T17:32:30Z")

</div>

But this seems to be doing what the elephant picture did (above) and linking to pixabay, rather than uploading to Discourse. (And the original report was using images on imgur, so it seems not to be the image or the site.)

Firefox 44.0.2 on Ubuntu Gnome 15.10.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [February 18, 2016, 11:57pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/13 "2016-02-18T23:57:21Z")

</div>

You’re sure you’re using right click, Copy Image?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 19, 2016, 4:36pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/14 "2016-02-19T16:36:36Z")

</div>

I just tried again to make sure. Curiously that didn’t copy the image when I did it in Firefox, it copied a URL to it, but it still worked.

I also tried with a larger image. It took a while to upload, but it did finish and then Firefox told me the image was too large to upload.

---

<div class="post-metadata">

### Author: ![TechnoBear](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/technobear/32/40546_2.png) [@TechnoBear](https://meta.discourse.org/u/TechnoBear)
#### Post date: [February 19, 2016, 4:41pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/15 "2016-02-19T16:41:54Z")

</div>

> [@eviltrout](#):
>
> Curiously that didn’t copy the image when I did it in Firefox, it copied a URL to it, but it still worked.

But that’s the reported bug; “copy image” and paste is behaving exactly as “copy image location” and paste; it isn’t uploading the image to Discourse.

(I don’t generally use this method with Discourse, so can’t say whether this is a recent issue or not.)

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 19, 2016, 4:44pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/16 "2016-02-19T16:44:57Z")

</div>

Wow now I feel dumb! That is interesting and perhaps out of our control. I will check it out.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 19, 2016, 5:22pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/17 "2016-02-19T17:22:44Z")

</div>

This is not something that is easy to change.

- If there is an image in the clipboard, copied from any other application, pasting in Firefox works fine.

- If the image was copied in Firefox using Copy Image, pasting no longer gives our application the `data` that we can parse, and only gives us the URL.

I think Discourse is doing the right thing in this case. Since it doesn’t have the image data to upload, it inserts the URL in the document as if that was copied and pasted.

---

<div class="post-metadata">

### Author: ![wal](https://avatars.discourse-cdn.com/v4/letter/w/d6d6ee/32.png) [@wal](https://meta.discourse.org/u/wal)
#### Post date: [August 13, 2024, 1:15pm UTC](https://meta.discourse.org/t/firefox-has-quirky-copy-paste-image-behavior/39345/18 "2024-08-13T13:15:28Z")

</div>

I think something here is still broken, even within Discourse.

there is a .webp image in this post;

> [@Discourse Gifs](https://meta.discourse.org/t/discourse-gifs/158738/242):
>
> [This Is Cool GIF by MOODMAN]

the full URL to the image is here, so its hosted on Discourse; [https://global.discourse-cdn.com/meta/original/4X/4/7/3/473600457bad5d0f8eb85689b40ca13507fac2bc.webp](https://global.discourse-cdn.com/meta/original/4X/4/7/3/473600457bad5d0f8eb85689b40ca13507fac2bc.webp)

note that this is an animated .webp image

However when I right click on the image in the Discourse page and Copy, then Paste into the onebox, I instead get a PNG which then gets converted by Discourse into the following JPG;

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/c/c/fcceb78e669ddd151fda6cda8e75d0553a092e5b.jpeg)

any thoughts? I am guessing this is not the intended behavior either?
