Improved handling of images.