Index: wp-includes/post-thumbnail-template.php
===================================================================
--- wp-includes/post-thumbnail-template.php	(revision 43588)
+++ wp-includes/post-thumbnail-template.php	(working copy)
@@ -23,7 +23,15 @@
  * @return bool Whether the post has an image attached.
  */
 function has_post_thumbnail( $post = null ) {
-	return (bool) get_post_thumbnail_id( $post );
+	/**
+	 * Filters the response for whether a post has an image attached.
+	 *
+	 * @since 5.0.0
+	 *
+	 * @param bool $has_thumbnail True if post has an image attached, otherwise false.
+	 * @param int  $post_id       The post ID.
+	 */
+	return (bool) apply_filters( 'has_post_thumbnail', get_post_thumbnail_id( $post ), $post );
 }

 /**
