File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
packages/gatsby-plugin-image/src/components Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ export function getWrapperProps(
6262
6363 let className = `gatsby-image-wrapper`
6464
65+ // If the plugin isn't installed we need to apply the styles inline
66+ if ( ! global . GATSBY___IMAGE ) {
67+ wrapperStyle . position = `relative`
68+ wrapperStyle . overflow = `hidden`
69+ }
70+
6571 if ( layout === `fixed` ) {
6672 wrapperStyle . width = width
6773 wrapperStyle . height = height
Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ export function lazyHydrate(
8484 ) }
8585 < MainImage
8686 { ...( props as Omit < MainImageProps , "images" | "fallback" > ) }
87+ width = { width }
88+ height = { height }
8789 className = { imgClassName }
8890 { ...getMainProps (
8991 isLoading ,
You can’t perform that action at this time.
0 commit comments