update selectedImages