diff --git a/src/Service/UwNodeContent.php b/src/Service/UwNodeContent.php
index ab23dfe38c457b1556ef45a7c718beeecc1e883d..f7f3998216ad1720ba15a660da5e8e9ea60bfcf2 100644
--- a/src/Service/UwNodeContent.php
+++ b/src/Service/UwNodeContent.php
@@ -112,9 +112,6 @@ class UwNodeContent {
    */
   public function getNodeFlags(Node $node, string $view_mode, string $content): array {
 
-    // Get the content types that have hero images.
-    $hero_image = $this->getHeroImageContentTypes();
-
     // Flags for getting teaser content.
     $node_flags['get_header'] = FALSE;
     $node_flags['get_footer'] = FALSE;