Update the extension of images