Project

ImagePlayground

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

Stars 100
Forks 7
Total downloads 712,347
Release ImagePlayground-PowerShellModule.v3.2.7
Language: C# Updated: 2026-08-25

API Reference

Command

ConvertTo-ImageBase64

Namespace ImagePlayground
Inputs
System.String
Outputs
System.String

Converts an image file into a Base64 encoded string.

Remarks

Converts an image file into a Base64 encoded string.

Examples

Authored help example

Get a Base64 string from an image


ConvertTo-ImageBase64 -FilePath in.png
        

Inline conversion and upload


$b64 = ConvertTo-ImageBase64 -FilePath photo.jpg; Invoke-RestMethod -Uri https://example/upload -Body $b64
        

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.

Syntax

ConvertTo-ImageBase64 -FilePath <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

FilePath String requiredposition: 0pipeline: True (ByValue)
Path to the image to convert.

Outputs

System.String