You should not use a h2
for a button. It is used for defining headers, which define the structure of your document.
If you want a button that is actually an image, do something like:
<button id="myButton">Do something</button>
#myButton {
width: 50px; height: 20px; //the dimensions of your image
background: url(myimage.png); //the URL of your image
border: none; //hiding default button borders
text-indent: -999em; //hiding the default text
}
The default text is needed for accesibility. People with a screen reader should be aware what your button does. This way you can also keep other useful properties of your button (like having a tabindex, being able to get focus, etc.).