How websites display in Facebook links

Some links to websites will come up with a picture preview of the site and some won’t.

This is presumably at the website end of things… anyone know how this works?

I suspect my Wordpress theme is preventing Facebook from capturing a screenshot. Is there a way to manually fix it?

I’ve never tried it myself, but this website article from 2012 purports to explain it. Essentially, it’s all defined by tags in the <HEAD>, but there’s also something on Facebook itself you can use to see how your site would look when shared, and tell it to refresh the image and text cache.

I checked the link, and it appears to still work.

On checking further, it appears that the properties in that article are out of date. (I did warn it was from 2012.)
Here’s Facebook’s official web developer document on how to handle this.

Thanks, BigT - exactly what I needed but couldn’t find on my own!