diff --git a/blocks/cards/cards.js b/blocks/cards/cards.js index 084c4e4f1b..99629fc122 100644 --- a/blocks/cards/cards.js +++ b/blocks/cards/cards.js @@ -14,7 +14,7 @@ export default function decorate(block) { }); ul.append(li); }); - ul.querySelectorAll('img').forEach((img) => { + ul.querySelectorAll('picture > img').forEach((img) => { const optimizedPic = createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }]); moveInstrumentation(img, optimizedPic.querySelector('img')); img.closest('picture').replaceWith(optimizedPic);