PHPnews.io

Fun with browsers: how to get an image into the current page

Written by Bram.us / Original link on Mar. 25, 2020

Christian Heilmann created a demo page where a user can add an image to the page through various ways.

I gave myself the task to build an interface to make it as easy as possible for a user to add an image into the document. I wanted to support:

  • Image upload
  • Drag and Drop
  • Copy and Paste

Each scenario requires a small tad of JS. Here’s a pen with the final result:

getting-an-image-into-the-browser.png

Fun with browsers: how to get an image into the current page →

bram bram link tutorialzine html calevans bram

« IMAP API – Self hosted application to access IMAP and SMTP accounts over REST - Indicating Scroll Position on a Page With CSS »