Skip to content

Commit b9978e1

Browse files
authored
fix(gatsby-plugin-image): Handle imgStyle in SSR (#29043)
1 parent f23ba4b commit b9978e1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

+10-2
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,18 @@ export const GatsbyImage: FunctionComponent<GatsbyImageProps> = function GatsbyI
106106
<MainImage
107107
data-gatsby-image-ssr=""
108108
className={imgClassName}
109-
style={imgStyle}
110109
{...(props as Omit<MainImageProps, "images" | "fallback">)}
111110
// When eager is set we want to start the isLoading state on true (we want to load the img without react)
112-
{...getMainProps(loading === `eager`, false, cleanedImages, loading)}
111+
{...getMainProps(
112+
loading === `eager`,
113+
false,
114+
cleanedImages,
115+
loading,
116+
undefined,
117+
undefined,
118+
undefined,
119+
imgStyle
120+
)}
113121
/>
114122
</LayoutWrapper>
115123
</GatsbyImageHydrator>

0 commit comments

Comments
 (0)