diff --git a/index.js b/index.js
index 293b1b7..fa197be 100644
--- a/index.js
+++ b/index.js
@@ -71,6 +71,10 @@ module.exports = opts => buf => {
args.push('-resize', opts.resize.width, opts.resize.height);
}
+ if (opts.metadata) {
+ args.push('-metadata', Array.isArray(opts.metadata) ? opts.metadata.join(',') : opts.metadata);
+ }
+
args.push('-o', execBuffer.output, execBuffer.input);
return execBuffer({
diff --git a/readme.md b/readme.md
index 701d19d..aba719f 100644
--- a/readme.md
+++ b/readme.md
@@ -121,6 +121,14 @@ Type: `Object { width: number, height: number }`
Resize the image. Happens after `crop`.
+##### metadata
+
+Type: `string | string[]`
+Default: `none`
+Values: `all` `none` `exif` `icc` `xmp`
+
+A list of metadata to copy from the input to the output if present.
+
#### buffer
Type: `Buffer`