![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
Firefox pastes copied transparent pngs with a black background
I recently moved to firefox and noticed that whenever I copy a transparent image and paste it, the image loses all transparency. I'm not really sure how to fix this, but it's a bit of a problem for me when I'm trying to share things on any website.
No, I am not posting from firefox to another program. It's coming from firefox to another open tab in the same window. Attached image is an example of the black background on an image that's supposed to have transparency, as it's a .png
所有回覆 (8)
I think websites vary in how they handle image pasting.
In a rich text editor such as an email compose window, usually the area is set to contenteditable and Firefox handles the paste. This page has an example of a contenteditable area:
https://developer.mozilla.org/docs/Web/Guide/HTML/Editable_content
Can you test pasting an image with transparency there? If you need an example, you can right-click > Copy Image on your user picture here on the forum. Does that work?
In other situations, the website may use scripts to intercept the paste so they can be handled specially. It's possible this might affect the image file, but it would depend on how the site works.
The websites didn't do this on Google Chrome, it's a problem that has to do with Firefox. For Discord I only had to copy and paste an image without any extra steps. Every site that used to accept a transparent paste on Chrome is rejecting them on Firefox and giving them a black background.
So, did you try the page I mentioned?
Otherwise, the problem is on Discord and where else?
Sorry, I have some processing issues and forgot to try that but yes, it worked on the page. I don't know how to impliment that code onto all of firefox however, since navigating files and code is a big weakness of mine
No problem, I think someone who uses Discord will need to look at why that site works differently from the more basic scenario.
Discord sadly isn't the only site having issues. The first editable box on the site you sent me was the only thing that worked so far. I've pasted things to imgur, tumblr, twitter, and a few other places such as the boxes you compose emails in.
I see the problem pasting on Twitter. I can't figure out a solution.
There is a workaround for non-password protected images, which is: instead of using right-click > Copy Image, use right-click > Copy Image Location and then use the upload button to fetch the image from the original website. (Comparison screenshot attached.)
But that is less convenient and limited.
There is a bug on file for this (460969), but it doesn't seem that anyone is working on it at the moment.