Project

ImagePlayground

Automate image processing, codes, metadata, charts, topology, and visual stories from PowerShell.

Stars 101
Forks 7
Total downloads 711,982
Release ImagePlayground-PowerShellModule.v3.2.7
Language: C# Updated: 2026-10-26
Command

Remove-ImageMetadata

Module
ImagePlayground
Inputs
System.String

Removes selected metadata from an image.

Syntax

Remove-ImageMetadata
[-All]
[-FilePath] <String>
[-MetadataType <ImageMetadataType[]>]
[-OutputPath] <String>
[-PassThru]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

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 -All

Remove C2PA Content Credentials but preserve EXIF, XMP, IPTC, and ICC metadata

Remove-ImageMetadata -FilePath in.jpg -OutputPath out.jpg -MetadataType C2pa

Parameters

-All SwitchParameter optional
Remove every metadata family supported by the image format.
-FilePath String requiredposition: 0pipeline: True (ByValue)
Source image file.
-MetadataType ImageMetadataType[] optional
Metadata families to remove. When omitted, all supported metadata is removed for backward compatibility.
Possible values: Exif, Xmp, Iptc, Icc, C2pa, All
-OutputPath String requiredposition: 1
Destination image path.
-PassThru SwitchParameter optional
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.