/recursive-compress-image

Reduce image size recursively in all subfolders via one command in linux bash

Primary LanguageShell

# recursive-compress-image

This repo is intended to help anyone who should compress images in a folder with it's subfolders holding images inside. This script uses imagemagick, so if you don't have this one just install:

sudo apt-get install imagemagick

To use:

open terminal and cd to project folder and type:

./compressr 'path/of/folder/that/holds/images'

This script compresses jpg files, if you have other extensions, just replace it with '.jpg' on 9th of line.

That is it. Enjoy using this script and have fun ;)

The script replaces images with the new compressed ones, so before you run this script, backup your images!!!