Update the mode of images