make teh thumbnails

This commit is contained in:
John Shaver 2022-07-12 08:39:50 -07:00
parent 139d80f2fe
commit ff3beac8ff
2 changed files with 6 additions and 15 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
node_modules
images/thumbnails

View file

@ -1,27 +1,17 @@
#!/bin/bash
IMAGES_DIR="./images"
WIDTH=
WIDTH=320
for f in ./images/*
do
echo "Processing $f"
case "$f" in
*.jpeg|*.jpg)
convert $f [320] ./images/thumbnails/`basename $f`;
;;
*.png)
echo "PNG $f"
;;
*.webp)
echo "WEBP $f"
;;
*.gif)
echo "GIF $f"
*.jpeg|*.jpg|*.png|*.webp|*.gif)
echo "Processing $f"
convert $f -resize $WIDTH ./images/thumbnails/th_`basename $f`
;;
*)
echo "OTHER ${f}"
echo "Ignoring $f"
;;
esac
done