update image code