Skip to content

Commit

Permalink
fix(gatsby-plugin-image): Fix blur up on navigate issue (#29333) (#29354
Browse files Browse the repository at this point in the history
)

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit 1443ecd)

Co-authored-by: Matt Kane <matt@gatsbyjs.com>
  • Loading branch information
abhiaiyer91 and ascorbic committed Feb 5, 2021
1 parent 4432c39 commit 4ef8ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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
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 4ef8ce1

Please sign in to comment.