JSFiddle - React, Tailwind, and code Playground
HTML
<img id='image' src='http://thoughtresults.com/files/articles-images/jquery-synchronous-ajax.jpg' alt='Thoguht Results' />
JavaScript
function printImage(image)
{
var printWindow = window.open('', 'Print Window', 'height=400,width=600');
printWindow.document.write('<html><head><title>Print Window</title>');
printWindow.document.write('</head><body ><img src=\'');
printWindow.document.write(image.src);
printWindow.document.write('\' /></body></html>');
printWindow.document.close();
printWindow.print();
}
var image = document.getElementById('image');
printImage(image);