Images are tombstoned iif they’re orphaned (ie. not linked anywhere in the application).
(Wow, that sentence is very sad…)
Images are linked to posts in the CookedPostProcessor class which is run in a background job after a post is saved.
This jobs requires sidekiq to be running but since it’s almost never the case in imports for performance reasons, the link is never stored in the database.
What @gerhard advised is the proper way of fixing this issue
run the import with sidekiq not running
once the import is done, launch sidekiq and wait for it to finish post processing all the posts
I see, and those things get queued up when the importer runs, and if you back up and restore elsewhere that doesn’t happen. And it’s taken me only a year and several dozen imports to figure that out!