Skip to content

Commit

Permalink
fix media list if format is not auto (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
benwalch committed Jan 22, 2025
1 parent 3621ff3 commit 3687cfd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Service/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,12 @@ private function parseThumbnailPictureList(Asset\Image\Thumbnail $thumbnail, arr
continue;
}

if (!$isAutoFormat) {
continue;
}

foreach ($thumbConfig->getAutoFormatThumbnailConfigs() as $autoFormatConfig) {
$autoFormatThumbnailAttributes = $this->getSourceTagAttributes($thumbnail, $autoFormatConfig, $mediaQuery, $image, $thumbnailOptions);
if (!empty($autoFormatThumbnailAttributes)) {
$data[] = $autoFormatThumbnailAttributes;
if ($isAutoFormat) {
foreach ($thumbConfig->getAutoFormatThumbnailConfigs() as $autoFormatConfig) {
$autoFormatThumbnailAttributes = $this->getSourceTagAttributes($thumbnail, $autoFormatConfig, $mediaQuery, $image, $thumbnailOptions);
if (!empty($autoFormatThumbnailAttributes)) {
$data[] = $autoFormatThumbnailAttributes;
}
}
}

Expand Down

0 comments on commit 3687cfd

Please sign in to comment.