How to Batch Compress PNG Images

Download pngcrush

Create a new images/compress.bat file

for /f "tokens=*" %%x in ('dir /b *.png') do (
	echo "crushing %%x"
	pngcrush_1_7_58_w64.exe -brute "%%x" temp.png
	move /Y temp.png "%%x"
)

Put all *.png images under the images folder and run

$ compress.bat

comments powered by Disqus