Facebook doesn’t display the related thumbail for some posts

Why would you expect it to correctly guess your thumbnail? Facebook detects images based on the Open Graph protocol. If you don’t have a meta tag specifying the image for that page, the best you can hope for is FB guessing based on any images in the page.

If you want to get the correct image, you would need the following code in your header for each page:

<meta property="og:image" content="<full URL to image here>" />

If you want a plugin solution, Add Meta Tags is a good option. It does much more than Open Graph, which will be good for your SEO.

Facebook provides a Debugger where you can test the end result.