Add parser for class attribute
continuous-integration/drone/push Build is passing Details

This commit is contained in:
philipp lang 2022-01-20 02:07:36 +01:00
parent a1d12b7df3
commit 0382ff970d
1 changed files with 2 additions and 1 deletions

View File

@ -100,7 +100,8 @@ class TagGenerator {
'sizes' => $sizes->implode(', '), 'sizes' => $sizes->implode(', '),
$options['lazy'] ? 'data-srcset' : 'srcset' => $srcset->implode(', '), $options['lazy'] ? 'data-srcset' : 'srcset' => $srcset->implode(', '),
$options['lazy'] ? 'data-src' : 'src' => $files->last()->get('url'), $options['lazy'] ? 'data-src' : 'src' => $files->last()->get('url'),
])); 'class' => data_get($options, 'class'),
])->filter(fn ($value) => (bool) $value));
} }
public function singleFile(MediaPath $path, ?string $ratio = 'original'): string public function singleFile(MediaPath $path, ?string $ratio = 'original'): string