Skip to content

Commit b1e328a

Browse files
rajatsharmapieh
authored andcommitted
fix(gatsby-plugin-sharp): honor stripMetadata setting for webp output images (#20860)
1 parent 092dc54 commit b1e328a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ const compressWebP = (pipeline, outputPath, options) =>
233233
imagemin
234234
.buffer(sharpBuffer, {
235235
plugins: [
236-
imageminWebp({ quality: options.webpQuality || options.quality }),
236+
imageminWebp({
237+
quality: options.webpQuality || options.quality,
238+
metadata: options.stripMetadata ? `none` : `all`,
239+
}),
237240
],
238241
})
239242
.then(imageminBuffer => fs.writeFile(outputPath, imageminBuffer))

0 commit comments

Comments
 (0)