I have this problem since wordpress was automatically updated by whm/wp-toolkit.
I continued to use the "Media Sync" plugin to return the images to the "Media Library" and it works. So now the images are back in the "Media Library". So "Media Sync" after returning the image to the Media Library does not return it to the Featured Image according to what is uploaded in each post.
– But now the images in the posts do not appear on the Site/Featured. There is no error that the image is missing from the frontend.
1). I changed the theme and disabled the plugin. permalink, flush media.
2). I downgraded wordpress to 6.6.1,
3). I cleared the cache and disabled the firewall in whm.
4). I also checked the wp_postmeta/wp_posts database, the images are there with the correct url.
After editing a post i get this message:
"wp-json/wp/v2/media/1142808?context=view&_locale=user 404 (Not Found)" and the image is not found within that post.
All this happened 3 days ago on the day WP/6.6.2 was launched.
Do you have any advice on what else to do?
Thanks!

Updating minor core versions is a native feature in WP so not sure what your kit does. What’sin your uploads directory and does the webserver own the files there? Not sure why your synching files that should all be on your server. Please explain.
There was a similar bug in 6.5.3, that involved deleting the htaccess file (if one exists) in /wp-content/uploads
Source: [https://wordpress.org/support/topic/missing-media-after-update-to-6-5-3/#post-17746552](https://wordpress.org/support/topic/missing-media-after-update-to-6-5-3/#post-17746552)
I have seen this before on a client’s site. I used the [Media Library Recovery](https://wordpress.org/plugins/wp-media-recovery/) plugin to fix the issue.