In this short article we will see how in JavaScript read image from clipboard as Data URLs encoded with Base64.

👍 ✔ Originally posted on:
We can run and test this code online under above link ☘

Very important thing is: this feature is available in the newest browsers but it can be treated as additional feature that helps user working ergonomics.

How to use it?:

  1. copy some bitmap to clipboard
    (it is good to open some image editor and copy selected image area, use some snipping tool or just press Print Screen key),
  2. run below example,
  3. press Paste image from clipboard button. — we help you to solve coding problems ✔️🚀. Ask question

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Coding Interview: Solving the “Rotate a Matrix” Problem in JavaScript

Localising date, time in React app with Internationalisation API

Photo by Valentin Antonucci from Pexels

Angular News: Angular 4, Linting Angular, Lazy Loading Best Practices, Native Mobile Apps with…

How to Fix Animated: `useNativeDriver` was not specified.

Where hooks fall short

File Upload — Express, MongoDB, Multer & S3

Migrating to webpack 5 to improve build time and reduce chunk sizes

Leetcode 49. Group Anagrams

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dirask ❤️ 🙂 💻

Dirask ❤️ 🙂 💻 — we help you to solve coding problems ✔️🚀. Ask question

More from Medium

Push notification in browser and how to use it using Javascript

Introduction to JSON

How to Get Started with GitHub and Git [FoolProof]

Top 5 Web Development Frameworks in 2021 Frontend