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(
60
60
61
61
let className = `gatsby-image-wrapper`
62
62
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
+
63
69
if ( layout === `fixed` ) {
64
70
wrapperStyle . width = width
65
71
wrapperStyle . height = height
Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ export function lazyHydrate(
84
84
) }
85
85
< MainImage
86
86
{ ...( props as Omit < MainImageProps , "images" | "fallback" > ) }
87
+ width = { width }
88
+ height = { height }
87
89
className = { imgClassName }
88
90
{ ...getMainProps (
89
91
isLoading ,
You can’t perform that action at this time.
0 commit comments