It's tested on CentOS 7. Before use it, you must install zip, unzip and ImageMagick: yum install zip unzip ImageMagick Create a exectable file (it names "zipresizer.sh" here.) with Code below: #!/bin/bash IFS=$'\n' mkdir ./tmp mkdir ./produced for UNZIPFILE in $( ls *.zip ); do echo item: $UNZIPFILE UNZIPCACHE="${UNZIPFILE%.zip}" mkdir ./tmp/$UNZIPCACHE unzip $UNZIPFILE -d tmp/$UNZIPCACHE find ./tmp/$UNZIPCACHE -name *.jpg -print -exec mogrify -resize x1308\> {} \; find ./tmp/$UNZIPCACHE -name *.png -print -exec mogrify -resize x1308\> {} \; find . -name *.txt -exec rm -f {} \; find . -name *.url -exec rm -f {} \; cd ./tmp zip -0 -r ../produced/$UNZIPFILE ./$UNZIPCACHE cd .. done echo done\! unset IFS You can change resize parameter with width x height like this: find ./tmp/$UNZIPCACHE -name *.jpg -print -exec mogrify -resize 512x1308 {} \; or by percentage: find ./tmp/$UNZIPCACHE -name *.jpg -print ...