How to Fix the Issue
The issue is a combination of the post type switcher plugin and advanced custom fields.
As we can’t remove advanced custom fields, remove the post type switcher plugin.
In database rows in wp_post which are images are being set to pages or posts.
Open wp_posts table in phpmyadmin/sequelpro etc, then search for guid contains “upload”
Post_type field should all be set to “attachment” any which aren’t will be the missing images. Change the post_type to attachment