diff --git a/packages/gatsby-plugin-sharp/src/process-file.js b/packages/gatsby-plugin-sharp/src/process-file.js index 8ff455e6b01bc..db595f828d716 100644 --- a/packages/gatsby-plugin-sharp/src/process-file.js +++ b/packages/gatsby-plugin-sharp/src/process-file.js @@ -165,12 +165,12 @@ exports.processFile = (file, transforms, options = {}) => { } if (options.useMozJpeg && transformArgs.toFormat === `jpg`) { - await compressJpg(clonedPipeline, outputPath, args) + await compressJpg(clonedPipeline, outputPath, transformArgs) return transform } if (transformArgs.toFormat === `webp`) { - await compressWebP(clonedPipeline, outputPath, args) + await compressWebP(clonedPipeline, outputPath, transformArgs) return transform }