Skip to content

Commit

Permalink
fix: switch lazy loading images to eager (bubkoo#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinBrett authored and istaiti committed Feb 7, 2023
1 parent 80d24ad commit 2e0b7d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/embed-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ async function embedImageNode<T extends HTMLElement | SVGImageElement>(
image.decode = resolve as any
}

if (image.loading === 'lazy') {
image.loading = 'eager'
}

if (clonedNode instanceof HTMLImageElement) {
clonedNode.srcset = ''
clonedNode.src = dataURL
Expand Down

0 comments on commit 2e0b7d5

Please sign in to comment.