able to resize the uploaded image when its size is larger than assigned(fixed #3563)

able to resize the uploaded image when its size is larger than assigned(fixed #3563)