able to resize the uploaded image when its size is larger than assigned

able to resize the uploaded image when its size is larger than assigned