JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" src="//api.filepicker.io/v1/filepicker.js"></script>
<script>filepicker.setKey('A8piXj7RMSendBI76N2Qgz');</script>
<img id="image" src="http://blog.ramboll.com/fehmarnbelt/wp-content/themes/ramboll2/images/profile-img.jpg" alt="" class="logo" width="120" height="120">
<br/>
<button id="upload" onclick="handleFiles();">Change Image</button>
JavaScript
function handleFiles() {
filepicker.pick({
mimetypes: ['image/*'],
//you can also define what uploading services you want to use here
},
function(e) { //you now have access to the file
var link = e.url;
//change picture
var img = document.getElementById("image");
});
}