Skip to content

Instantly share code, notes, and snippets.

@mattbalzan
Last active January 6, 2025 11:02
Show Gist options
  • Save mattbalzan/3124a7fb65b7920dfd3a1e0102b2a8f6 to your computer and use it in GitHub Desktop.
Save mattbalzan/3124a7fb65b7920dfd3a1e0102b2a8f6 to your computer and use it in GitHub Desktop.
Encode image to base64
# --[ Encode image to base64 ]
# --[ Matt Balzan | mattGPT.co.uk ]
$path = "path\to\image\file.jpg"
[convert]::ToBase64String((Get-Content $path -Encoding byte)) >> "path\to\save\base64\text\to.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment