Command
Remove-ImageMetadata
Removes selected metadata from an image.
Syntax
Remove-ImageMetadata
[-All]
[-FilePath] <String>
[-MetadataType <ImageMetadataType[]>]
[-OutputPath] <String>
[-PassThru]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
JPEG and PNG files are rewritten without re-encoding their compressed image data. Choose individual metadata families, or use All for the compatibility behavior that removes every supported family. HEIF and HEIC cleanup is limited to EXIF and XMP.
Examples
Save a copy without metadata
Remove-ImageMetadata -FilePath in.jpg -OutputPath out.jpg -AllRemove C2PA Content Credentials but preserve EXIF, XMP, IPTC, and ICC metadata
Remove-ImageMetadata -FilePath in.jpg -OutputPath out.jpg -MetadataType C2paParameters
- -All SwitchParameter
- Remove every metadata family supported by the image format.
- -FilePath String
- Source image file.
- -MetadataType ImageMetadataType[]
- Metadata families to remove. When omitted, all supported metadata is removed for backward compatibility.
- Possible values:
Exif,Xmp,Iptc,Icc,C2pa,All - -OutputPath String
- Destination image path.
- -PassThru SwitchParameter
- Return a result describing which metadata was removed and whether re-encoding occurred.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.