make teh thumbnails
This commit is contained in:
parent
139d80f2fe
commit
ff3beac8ff
2 changed files with 6 additions and 15 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
node_modules
|
||||
images/thumbnails
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue