/ Published in: Bash
* Resized images are generated into TARGET_DIR.
* Change the resolution (800x800 in my example) and quality (80) as you want.
* The command keeps the image's proportion. 1600x1200 will be converted into 800x600, 1200x1600 into 600x800.
_Notice_: the command does also resize images in sub-directories but put them in the same target directory (overwrites any existing file).
* Change the resolution (800x800 in my example) and quality (80) as you want.
* The command keeps the image's proportion. 1600x1200 will be converted into 800x600, 1200x1600 into 600x800.
_Notice_: the command does also resize images in sub-directories but put them in the same target directory (overwrites any existing file).
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
find SOURCE_DIR -print -name "*.jpg" -execdir convert -resize 800x800 -quality 80 '{}' 'TARGET_DIR/{}' \; find Pictures/ -print -name "*.jpg" -execdir convert -resize 800x800 -quality 80 '{}' '/tmp/test/{}' \;