Created
March 2, 2019 20:11
-
-
Save mrcodetastic/01b4d20d600fc8260b0011ac31e21646 to your computer and use it in GitHub Desktop.
Windows Powershell to recurse through all directories and re-compress/ JPEGs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Re-compress / Optimise all JPEGs in place (80% quality = approx. 70% disk saving, with little noticeable difference ) | |
# NOTE: This will over-write the original JPED file! Also change the path to your executable. | |
# Requires jpegoptim: https://github.com/XhmikosR/jpegoptim-windows/releases | |
Get-ChildItem -Recurse -File -Include *.jpg,*.JPEG | Foreach {C:\<CHANGE_THIS_PATH>\jpegoptim --max=80 $_.fullname} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment