Created
November 5, 2014 18:22
-
-
Save Mulder90/294572ef6661756f55e7 to your computer and use it in GitHub Desktop.
Optimize Images
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
@echo off | |
echo Optimizing JPEG ^& PNG Images... | |
cd %1 | |
forfiles /s /m *.jpg /c "cmd /c @\"C:\Program Files\Image Optimization\jpegtran.exe\" -copy none -optimize -progressive @file @file" | |
forfiles /s /m *.jpeg /c "cmd /c @\"C:\Program Files\Image Optimization\jpegtran.exe\" -copy none -optimize -progressive @file @file" | |
forfiles /s /m *.JPG /c "cmd /c @\"C:\Program Files\Image Optimization\jpegtran.exe\" -copy none -optimize -progressive @file @file" | |
forfiles /s /m *.JPEG /c "cmd /c @\"C:\Program Files\Image Optimization\jpegtran.exe\" -copy none -optimize -progressive @file @file" | |
forfiles /s /m *.png /c "cmd /c @\"C:\Program Files\Image Optimization\optipng.exe\" -o7 -strip all @file" | |
forfiles /s /m *.PNG /c "cmd /c @\"C:\Program Files\Image Optimization\optipng.exe\" -o7 -strip all @file" | |
echo. & echo Process done! | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment