portfolio/scripts/process-images.sh

18 lines
281 B
Bash
Raw Normal View History

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"
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