The lab blog of my research group.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
371 B

#!/bin/bash
for i in static/images/posts/*.{jpg,png}
do
in=$i
if [[ "${in%.*}" == *_thumb ]]; then
# Don't thumbnail the thumbnails
continue
fi
out="${in%.*}_thumb.${in##*.}"
echo "$in -> $out"
if [[ -f $out ]]; then
echo " ...$out exists"
continue
fi
echo " ...converting"
convert $in -filter Lanczos -resize 9999x160 $out
done