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 @@ -60,6 +60,12 @@ export function getWrapperProps(
6060
6161 let className = `gatsby-image-wrapper`
6262
63+ // If the plugin isn't installed we need to apply the styles inline
64+ if ( ! global . GATSBY___IMAGE ) {
65+ wrapperStyle . position = `relative`
66+ wrapperStyle . overflow = `hidden`
67+ }
68+
6369 if ( layout === `fixed` ) {
6470 wrapperStyle . width = width
6571 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