added image load event to get height and width reliably