Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
How to copy image to clipboard in firefox

On my page I want the user to have an option where he clicks the button and the image is saved in the clipboard. I am using this code for this:

navigator.clipboard.write([
    new ClipboardItem({
            'image/png': blob
    })
]);

According to this https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/write This doesn't work with firefox. But there is no good alternative.

I found this but it's not for webpage only for addons https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/clipboard/setImageData

Also I know that this used to be done with execComend() but according to this https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand it's deprecated.

So how can I achieve such a basic task of copying images to clipboard on firefox?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!