update image and index