<html>
<button id='btn1' data-v1='Eins' data-v2='Zwei'><img id='img1' src='hallo.gif' style='width:3em;height:3rem' /></button>
<button id='btn2' data-v1='Eins' data-v2='Zwei'><img id='img2' src='hallo.gif' style='width:3em;height:3rem'></button>
<script>
document.getElementById('btn1').addEventListener( 'click', function(){ console.log( this.dataset.v1 ) }, false );
document.getElementById('btn2').addEventListener( 'click', function(){ console.log( this.dataset.v2 ) }, false );
</script>
</html>
Geht im Firefox 65 und in Chromium 73.