Skip to content

Commit dd01423

Browse files
authoredMar 15, 2022
fix: remove loading attribute on HD target (#186)
1 parent 219a95f commit dd01423

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/medium-zoom.js

+2
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ const mediumZoom = (selector, options = {}) => {
346346
// Reset the `scrset` property or the HD image won't load.
347347
active.zoomedHd.removeAttribute('srcset')
348348
active.zoomedHd.removeAttribute('sizes')
349+
// Remove loading attribute so the browser can load the image normally
350+
active.zoomedHd.removeAttribute('loading')
349351

350352
active.zoomedHd.src = active.zoomed.getAttribute('data-zoom-src')
351353

0 commit comments

Comments
 (0)