portfolio/scripts/process-images.sh
2022-07-17 14:14:19 -07:00

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