I've made the checkbox input invisible and put it over the image so that I could use the image like a checkbox, however, now I need to somehow indicate when an image has been selected and deselected. This is why I'm trying to add a check mark over the image when selected and remove it if deselected. Sadly, I am not sure what the best approach is.
Should I display another image over the selected image? Should I make the check mark using pure CSS so I don't have to use an image. How would I go about implementing the change?
.categories-wrapper {
position: relative;
}
.category-input {
position: absolute;
top: 0;
left: 0;
opacity: 0;
width: 100%;
height: 100%;
}
<div class="categories-wrapper">
<img src='https://66.media.tumblr.com/4f3cbb1b66a76a19a9794a162373abc5/tumblr_inline_n258pbAEBc1qhwjx8.png' alt='Random image' />
<input class='category-input' type="checkbox" name="categories[]" value="">
<input type="hidden" name="categoryFiles[]" value="">
</div>