17 lines
281 B
Bash
Executable file
17 lines
281 B
Bash
Executable file
#!/bin/bash
|
|
|
|
IMAGES_DIR="./images"
|
|
WIDTH=320
|
|
|
|
for f in ./images/*
|
|
do
|
|
case "$f" in
|
|
*.jpeg|*.jpg|*.png|*.webp|*.gif)
|
|
echo "Processing $f"
|
|
convert $f -resize $WIDTH\> ./images/thumbnails/th_`basename $f`
|
|
;;
|
|
*)
|
|
echo "Ignoring $f"
|
|
;;
|
|
esac
|
|
done
|