Skip to content

Commit bca7dd3

Browse files
committed
[TASK] Keep original CSS classes in ViewHelper
1 parent ddaec3e commit bca7dd3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Classes/ViewHelpers/ImageViewHelper.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,13 @@ public function render(ImageInterface $image = null, $ratio = 1, $maximumWidth =
7272

7373
$srcSetString = $this->srcSetService->getSrcSetAttribute($image, $ratio, $maximumWidth, $maximumHeight, $allowCropping, $quality, $sizes, null);
7474

75+
$classNames = ['lazyload'];
76+
if (isset($this->arguments['class'])) {
77+
$classNames[] = $this->arguments['class'];
78+
}
79+
7580
$this->tag->addAttributes([
76-
'class' => 'lazyload',
81+
'class' => implode(' ', $classNames),
7782
'data-sizes' => 'auto',
7883
'data-srcset' => $srcSetString,
7984
]);

0 commit comments

Comments
 (0)