Fix resizing image when window is resized