Resize image when it is initially loaded