<html> <head> <script> function updateTitle() { document.title = document.getElementById('img').naturalHeight; } </script> </head> <body onload="updateTitle()"> <img id="img" onload="updateTitle()" src="chrome.png" /> </body> </html>