Let image resolution be calculated when the image loads