Add .has-thumbnail or .lacks-thumbnail contextual post_class.