diff --git a/blocks/cards/cards.js b/blocks/cards/cards.js index 58993b13d3..016481686a 100644 --- a/blocks/cards/cards.js +++ b/blocks/cards/cards.js @@ -12,7 +12,7 @@ export default function decorate(block) { }); ul.append(li); }); - ul.querySelectorAll('img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }]))); + ul.querySelectorAll('picture > img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }]))); block.textContent = ''; block.append(ul); }