When the window resizes, resize the current image