Skip to content

Commit 3be9541

Browse files
authored
fix(gatsby-plugin-image): Apply defaults when width and height are set (#29726)
1 parent 3db77a5 commit 3be9541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby-plugin-image/src/image-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export function setDefaultDimensions(
170170
layout = camelCase(layout) as Layout
171171

172172
if (width && height) {
173-
return args
173+
return { ...args, formats, layout }
174174
}
175175
if (sourceMetadata.width && sourceMetadata.height && !aspectRatio) {
176176
aspectRatio = sourceMetadata.width / sourceMetadata.height

0 commit comments

Comments
 (0)