Skip to content

Instantly share code, notes, and snippets.

@hbulens
Created December 5, 2022 08:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Recursive compress images using imagemagick
param(
[Parameter(Mandatory=$true)]
[String]$path
)
Get-ChildItem –Path $path –Recurse -Include *.png,*.jpg,*.bmp | Foreach-Object {
magick $_.FullName -strip -interlace Plane -gaussian-blur 0.05 -quality 85% $_.FullName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment