Autosave images (drag&drop input) and restore on reopening

Mac-app; question about autosaving image-file-user-inputs inside a macOS-app. How can I make it so that image-files that has been inputted into the app through a "drag-&-drop"-function, not the normal "open file"-function, to be auto-saved by the app so the image-files are still there after I close and re-open the app? What codes could I use to accomplish this goal?
Autosave images (drag&drop input) and restore on reopening
 
 
Q