linkify images in search results
authorAndrew Engelbrecht <andrew@fsf.org>
Fri, 2 Aug 2019 19:01:54 +0000 (15:01 -0400)
committerAndrew Engelbrecht <andrew@fsf.org>
Fri, 2 Aug 2019 19:01:54 +0000 (15:01 -0400)
templates/search-result.html.twig

index 31ae4712f8ed892e8fba4947486481391a1d0394..69e99ead28c7533851d9ac7a5170df110b1d5d95 100644 (file)
@@ -65,7 +65,9 @@
 {{ title_suffix }}
 {% if node.field_image.0 %}
   <div class="search-image">
-    <img src="{{ node.field_image.0.entity.uri.value | image_style('thumbnail') }}">
+    <a href="{{ url }}">
+      <img src="{{ node.field_image.0.entity.uri.value | image_style('thumbnail') }}">
+    </a>
   </div>
 {% endif %}
 {% if snippet %}