SearchKit - Fix display of image fields
authorColeman Watts <coleman@civicrm.org>
Fri, 5 Nov 2021 18:39:05 +0000 (14:39 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 5 Nov 2021 18:39:05 +0000 (14:39 -0400)
ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php

index cc1b821f99dbc2ff241641257f066738fce06eff..fb0e91e93183ba2f514db30590cd419c4f96a118 100644 (file)
@@ -463,7 +463,7 @@ abstract class AbstractRunAction extends \Civi\Api4\Generic\AbstractAction {
   private function formatImage($column, $data) {
     $tokenExpr = $column['rewrite'] ?: '[' . $column['key'] . ']';
     return [
-      'url' => $this->replaceTokens($tokenExpr, $data, 'url'),
+      'src' => $this->replaceTokens($tokenExpr, $data, 'url'),
       'height' => $column['image']['height'] ?? NULL,
       'width' => $column['image']['width'] ?? NULL,
     ];