The featured image itself– the actual .jpg
, or .png
, most likely– is saved to wp-content/uploads
with primary image data saved to $wpdb->posts
as an attachment
post type. Additional relevant data for the image is saved in $wpdb->postmeta
.
What makes an image “featured” or not is an entry in $wpdb->postmeta
under the key _thumbnail_id
and a post_id
field matching the post ID of the post for which the image is a “feature”– aka thumbnail.
It is hard to say where things have gone wrong. It could be any three of those components.