WordPress fix MISSING _wp_attachment_metadata

Guest

We noticed, after enabling WP super cache and cloudflare service, that when sharing a post within facebook the featured image would not show.

At first we thought it could be an effect of those caches, and perhaps they play some part in it, but digging deeper we found that some images in “postmeta” table had missing information regarding the size oft he picture, and that the _wp_attachment_metadata information was missing. Facebook sees them as images of 0 x 0 size and do not use them.

How can I generate this info on the database for images that have it missing?

For the moment FB Thumb Fixer seem to be working to inform facebook of the featured image to use, bu seems like a waste of space to have a plugin to just do that.