From 0d57cc1457bc4cea2d3db8d108a471cf479a79df Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 15 Jan 2021 12:58:42 +0000 Subject: [PATCH] fix(gatsby-plugin-image): Handle imgStyle in SSR --- .../src/components/gatsby-image.server.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/gatsby-plugin-image/src/components/gatsby-image.server.tsx b/packages/gatsby-plugin-image/src/components/gatsby-image.server.tsx index 7226dfe9f0349..f7716b930a749 100644 --- a/packages/gatsby-plugin-image/src/components/gatsby-image.server.tsx +++ b/packages/gatsby-plugin-image/src/components/gatsby-image.server.tsx @@ -106,10 +106,18 @@ export const GatsbyImage: FunctionComponent = function GatsbyI )} // When eager is set we want to start the isLoading state on true (we want to load the img without react) - {...getMainProps(loading === `eager`, false, cleanedImages, loading)} + {...getMainProps( + loading === `eager`, + false, + cleanedImages, + loading, + undefined, + undefined, + undefined, + imgStyle + )} />