JSFiddle - React, Tailwind, and code Playground

HTML

Original image: <br>
<img src='http://www.photographyblogger.net/wp-content/uploads/2009/12/Picture-in-a-picture4.jpg'>

<br>In Canvas: <br>
<canvas id="thecanvas"></canvas>

JavaScript

var img = new Image();
var cv = document.getElementById('thecanvas');
img.src = 'http://www.photographyblogger.net/wp-content/uploads/2009/12/Picture-in-a-picture4.jpg';
img.onload = function() {
    var ctx = cv.getContext('2d');
    cv.style.width = img.width + 'px';
    cv.style.height = img.height + 'px';
    ctx.drawImage(img, 0, 0);
};