emptygif
Language: English

All languages and frameworks

PowerShell PowerShell

A PowerShell snippet for PowerShell that answers requests for /pixel.gif with the empty GIF, decoded once at startup.

PowerShell PowerShell

File
pixel.ps1
# Works in Windows PowerShell 5.1 and PowerShell 7+ (.NET needs an absolute path).
$bytes = [Convert]::FromBase64String('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==')
[IO.File]::WriteAllBytes((Join-Path $PWD 'pixel.gif'), $bytes)

We ran this snippet and compared the bytes it returned.

Official site: PowerShell

More in PowerShell