Skip to content

Commit 4fd158f

Browse files
fix(gatsby-plugin-sharp): Apply transformArgs on compressJpg a… (#22538)
Currently the `defaultQuality` is not being applied when compressing jpg or webp as the wrong args are used.
1 parent 67e1996 commit 4fd158f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/gatsby-plugin-sharp/src/process-file.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ exports.processFile = (file, transforms, options = {}) => {
165165
}
166166

167167
if (options.useMozJpeg && transformArgs.toFormat === `jpg`) {
168-
await compressJpg(clonedPipeline, outputPath, args)
168+
await compressJpg(clonedPipeline, outputPath, transformArgs)
169169
return transform
170170
}
171171

172172
if (transformArgs.toFormat === `webp`) {
173-
await compressWebP(clonedPipeline, outputPath, args)
173+
await compressWebP(clonedPipeline, outputPath, transformArgs)
174174
return transform
175175
}
176176

0 commit comments

Comments
 (0)