JSFiddle - React, Tailwind, and code Playground
HTML
<div align="center"> <a href="#" id="other-color"><img style="width:75px;height:auto" src="icons/slr-camera-2-256.png"/></a>
<input type="file" id="myFile" style="display:none" />
</div>
JavaScript
var a = document.getElementById('other-color');
a.onclick = loadFile;
function loadFile() {
alert("test");
}