Skip to content

Commit

Permalink
fix(gatsby-plugin-image): Fix blur up on navigate issue (#29333)
Browse files Browse the repository at this point in the history
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
  • Loading branch information
ascorbic and gatsbybot committed Feb 5, 2021
1 parent fe4cd06 commit 1443ecd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const GatsbyImageHydrator: FunctionComponent<GatsbyImageProps> = function
image,
onLoad: customOnLoad,
backgroundColor,
loading = `lazy`,
...props
}) {
if (!image) {
Expand Down Expand Up @@ -169,6 +170,7 @@ export const GatsbyImageHydrator: FunctionComponent<GatsbyImageProps> = function
toggleIsLoaded(true)
},
ref,
loading,
...props,
},
root,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function lazyHydrate(
}

const cacheKey = JSON.stringify(images)
const hasLoaded = !hydrated.current && hasImageLoaded(cacheKey)
const hasLoaded = hasImageLoaded(cacheKey)

imgStyle = {
objectFit,
Expand Down

0 comments on commit 1443ecd

Please sign in to comment.