I know there is <input type="file"/>
but I have an <img>
inside of <div>
and I would love to ask for user to upload an image after clicking on that <div>
. This is the code I have:
<div class="container">
<img src="..." alt="Profile image" class="profileImg">
<div class="overlay">
<i class="fas fa-pencil-alt text"></i>
</div>
</div>
Is this possible only in HTML or do I need JS or something else?