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 31ae471..69e99ea 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 %}