Skip to content

Commit 4ef8ce1

Browse files
fix(gatsby-plugin-image): Fix blur up on navigate issue (#29333) (#29354)
Co-authored-by: gatsbybot <[email protected]> (cherry picked from commit 1443ecd) Co-authored-by: Matt Kane <[email protected]>
1 parent 4432c39 commit 4ef8ce1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/gatsby-plugin-image/src/components/gatsby-image.browser.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export const GatsbyImageHydrator: FunctionComponent<GatsbyImageProps> = function
6060
image,
6161
onLoad: customOnLoad,
6262
backgroundColor,
63+
loading = `lazy`,
6364
...props
6465
}) {
6566
if (!image) {
@@ -169,6 +170,7 @@ export const GatsbyImageHydrator: FunctionComponent<GatsbyImageProps> = function
169170
toggleIsLoaded(true)
170171
},
171172
ref,
173+
loading,
172174
...props,
173175
},
174176
root,

packages/gatsby-plugin-image/src/components/lazy-hydrate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function lazyHydrate(
5959
}
6060

6161
const cacheKey = JSON.stringify(images)
62-
const hasLoaded = !hydrated.current && hasImageLoaded(cacheKey)
62+
const hasLoaded = hasImageLoaded(cacheKey)
6363

6464
imgStyle = {
6565
objectFit,

0 commit comments

Comments
 (0)