It appears that metadata rotation (used mainly by cameras) doesn't get recognized by the code used to generate thumbnails.
Example: wolfyalex96 features a number of posts that are rotated incorrectly in the thumbnails but show up correctly when opened.
I assume the fix would require, at minimum, hunting down images that contain that metadata and applying it to their thumbnails as well.