Skip to content

Instantly share code, notes, and snippets.

@dhcgn
Created December 31, 2025 13:56
Show Gist options
  • Select an option

  • Save dhcgn/e7ee14963273b71ae8f7b36cfe8751d2 to your computer and use it in GitHub Desktop.

Select an option

Save dhcgn/e7ee14963273b71ae8f7b36cfe8751d2 to your computer and use it in GitHub Desktop.
Reencode large JPEG files with jpegli and preserve exif
# Download from https://github.com/dhcgn/jpegli-windows-explorer-extension
$jpegliconverter = "C:\Users\danie\AppData\Local\jpegli-windows-explorer-extension\jpegli-windows-explorer-extension.exe"
gci $f -File -Recurse -Filter *.jpg -Verbose | ?{$_.Length -gt 35mb} | sort -Property Length -Descending | %{ .$jpegliconverter ("{0}" -f $_.FullName) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment