Changes to image code