JSFiddle - React, Tailwind, and code Playground
HTML
<label for="imagem1">
<img src="http://eyosongive.us/lolk/data/img/aatrox_1.jpg" alt="">
</label>
<input type="checkbox" id="imagem1" />
CSS
.selecionada {
opacity: 0.5;
}
JavaScript
$('input').on('change', function () {
$('label[for="' + this.id + '"]')[this.checked ? 'addClass' : 'removeClass']('selecionada');
});