get_the_post_thumbnail() produces different HTML on same arguments
So I found the issue. The twentyseventeen theme has a built-in function in functions.php that does this: Add custom image sizes attribute to enhance responsive image functionality for post thumbnails function twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) it has an if (is_archive()) condition in there. I had to override the function with my own custom function … Read more