Saving an Image in Core Data

Given an image selected in a UIImagePickerController and saved as a UIImage, how can I save that image in a core data model using XCode 14 beta? I’ve only found videos from 2 years ago where they make their own persistence file which is outdated.

Any help would be greatly appreciated! Thanks.

Saving an Image in Core Data
 
 
Q