Fix preview mode for images.