Fix resizing of images.