You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reportError(`Failed to process image ${file.absolutePath}`,err)
60
+
return{}
60
61
}
61
62
62
63
returnmetadata
@@ -97,6 +98,7 @@ export async function generateImageData({
97
98
tracedSVGOptions ={},
98
99
transformOptions ={},
99
100
quality,
101
+
backgroundColor,
100
102
}=args
101
103
102
104
args.formats=args.formats||[`auto`,`webp`]
@@ -118,7 +120,7 @@ export async function generateImageData({
118
120
reporter.warn(
119
121
`Specifying fullWidth images will ignore the width and height arguments, you may want a constrained image instead. Otherwise, use the breakpoints argument.`
120
122
)
121
-
args.width=metadata.width
123
+
args.width=metadata?.width
122
124
args.height=undefined
123
125
}
124
126
@@ -187,15 +189,19 @@ export async function generateImageData({
Copy file name to clipboardExpand all lines: packages/gatsby-transformer-sharp/src/customize-schema.js
+1-2
Original file line number
Diff line number
Diff line change
@@ -504,9 +504,8 @@ const imageNodeType = ({
504
504
type: TransformOptionsType,
505
505
description: `Options to pass to sharp to control cropping and other image manipulations.`,
506
506
},
507
-
background: {
507
+
backgroundColor: {
508
508
type: GraphQLString,
509
-
defaultValue: `rgba(0,0,0,0)`,
510
509
description: `Background color applied to the wrapper. Also passed to sharp to use as a background when "letterboxing" an image to another aspect ratio.`,
0 commit comments