2022-07-12 15:15:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
IMAGES_DIR="./images"
|
2022-07-12 15:39:50 +00:00
|
|
|
WIDTH=320
|
2022-07-12 15:15:33 +00:00
|
|
|
|
|
|
|
for f in ./images/*
|
|
|
|
do
|
|
|
|
case "$f" in
|
2022-07-12 15:39:50 +00:00
|
|
|
*.jpeg|*.jpg|*.png|*.webp|*.gif)
|
|
|
|
echo "Processing $f"
|
2022-07-17 21:14:19 +00:00
|
|
|
convert $f -resize $WIDTH\> ./images/thumbnails/th_`basename $f`
|
2022-07-12 15:15:33 +00:00
|
|
|
;;
|
|
|
|
*)
|
2022-07-12 15:39:50 +00:00
|
|
|
echo "Ignoring $f"
|
2022-07-12 15:15:33 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|