Skip to content

Commit

Permalink
Update scripts.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RitwikSrivastava authored Oct 14, 2024
1 parent 1fa9780 commit 0bebb6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ function decorateExternalImages(ele, deliveryMarker) {
const queryParams = appendQueryParams(new URL(srcset, extImageSrc), searchParams);
if (srcset.includes('/is/image/')) {
child.setAttribute('srcset', queryParams.replaceAll('%24', '$'));
child.setAttribute('loading', 'eager');
} else {
child.setAttribute('srcset', queryParams);
}
Expand All @@ -236,6 +237,7 @@ function decorateExternalImages(ele, deliveryMarker) {
const queryParams = appendQueryParams(new URL(src, extImageSrc), searchParams);
if (src.includes('/is/image/')) {
child.setAttribute('src', queryParams.replaceAll('%24', '$'));
child.setAttribute('loading', 'eager');
} else {
child.setAttribute('src', queryParams);
}
Expand Down

0 comments on commit 0bebb6d

Please sign in to comment.