Skip to content

Commit 136f35b

Browse files
committed
Support icons passed as asset ID
1 parent 0dd3d1f commit 136f35b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Util/Block/ImageRenderer.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,16 @@ public function icon(AbstractBlock $block, string $iconId)
8888
. '/' . $iconId
8989
. '.svg';
9090

91-
return $this->getIconOutput($imageId, [
91+
$attributes = [
9292
'width' => $iconSize,
9393
'height' => $iconSize,
94-
]);
94+
];
95+
96+
if ($this->isAssetId($imageId)) {
97+
return $this->getByAssetId($imageId, $attributes);
98+
}
99+
100+
return $this->getIconOutput($imageId, $attributes);
95101
}
96102

97103
public function getIconOutput(

0 commit comments

Comments
 (0)