JSFiddle - React, Tailwind, and code Playground
HTML
<input type="file" id="file_item" value="/path/to/image" style="visibility: hidden;">
<button id="my-btn">click me for opening file dialog</button>
JavaScript
document.getElementById('my-btn').onclick = function () {
document.getElementById('file_item').click();
};