File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/gatsby-plugin-sharp/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export async function generateImageData({
8686} : IImageDataArgs ) : Promise < IGatsbyImageData | undefined > {
8787 const {
8888 layout = `constrained` ,
89- placeholder = `blurred ` ,
89+ placeholder = `dominantColor ` ,
9090 tracedSVGOptions = { } ,
9191 transformOptions = { } ,
9292 quality,
@@ -210,9 +210,10 @@ export async function generateImageData({
210210
211211 const sizes = args . sizes || getSizes ( imageSizes . unscaledWidth , layout )
212212
213- const primaryIndex = imageSizes . sizes . findIndex (
214- size => size === imageSizes . unscaledWidth
215- )
213+ const primaryIndex =
214+ layout === `fullWidth`
215+ ? imageSizes . sizes . length - 1 // The largest image
216+ : imageSizes . sizes . findIndex ( size => size === imageSizes . unscaledWidth )
216217
217218 if ( primaryIndex === - 1 ) {
218219 reporter . error (
You can’t perform that action at this time.
0 commit comments