From 48192e6e973924a38aa9bcb6c77b756874f17d9b Mon Sep 17 00:00:00 2001 From: Smit Shah Date: Fri, 11 Oct 2024 18:54:14 +0530 Subject: [PATCH] aem js create optimize parameter removed --- scripts/aem.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/aem.js b/scripts/aem.js index 80b1ac0478..8528ea750f 100644 --- a/scripts/aem.js +++ b/scripts/aem.js @@ -339,7 +339,8 @@ function createOptimizedPicture( const source = document.createElement('source'); if (br.media) source.setAttribute('media', br.media); source.setAttribute('type', 'image/webp'); - source.setAttribute('srcset', `${pathname}?width=${br.width}&format=webply&optimize=medium`); + // source.setAttribute('srcset', `${pathname}?width=${br.width}&format=webply&optimize=medium`); + source.setAttribute('srcset', `${pathname}`); picture.appendChild(source); }); @@ -348,14 +349,16 @@ function createOptimizedPicture( if (i < breakpoints.length - 1) { const source = document.createElement('source'); if (br.media) source.setAttribute('media', br.media); - source.setAttribute('srcset', `${pathname}?width=${br.width}&format=${ext}&optimize=medium`); + // source.setAttribute('srcset', `${pathname}?width=${br.width}&format=${ext}&optimize=medium`); + source.setAttribute('srcset', `${pathname}`); picture.appendChild(source); } else { const img = document.createElement('img'); img.setAttribute('loading', eager ? 'eager' : 'lazy'); img.setAttribute('alt', alt); picture.appendChild(img); - img.setAttribute('src', `${pathname}?width=${br.width}&format=${ext}&optimize=medium`); + // img.setAttribute('src', `${pathname}?width=${br.width}&format=${ext}&optimize=medium`); + img.setAttribute('src', `${pathname}`); } });