1
0

support for gifs

This commit is contained in:
Philip Wagner
2025-02-12 16:12:57 +01:00
parent 76d1748d50
commit 93b75d36a5

View File

@@ -10,7 +10,11 @@ $src = $image->url();
<a href="<?= $block->link()->value() ?>">
<?php endif ?>
<figure>
<img srcset="<?= $image->srcset('full') ?>" alt="<?= $alt->esc() ?>" loading="lazy">
<img <?php if ($image->extension() == 'gif'): ?>
src="<?= $src ?>"
<?php else: ?>
srcset="<?= $image->srcset('full') ?>"
<?php endif ?>alt="<?= $alt->esc() ?>" loading="lazy">
<?php if ($caption->isNotEmpty()): ?>
<figcaption>
<?= $caption ?>