<audio id=audio src="sound.mp3" controls></audio>
<img id=img src="image1.jpg" />
<button id=btn onclick="playPause()"> play </button>
const playPause = _ => {
if(audio.paused){
audio.play();
btn.textContent = " pause ";
img.src = "image2.jpg";
}else{
audio.pause();
btn.innerText = " play ";
img.src = "image1.jpg";
}
}