var image = new Image(); image.src = 'image.jpg'; image.onload = function() { alert( [image.width, image.height] ); }