variabile = document.getElementById("immagine").offsetHeight;
possono esserci altri modi ma potrebbe bastarti fare cosi'