From 2ced3e9d3f2eb112105f8ece90485a2f0ee2357a Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 6 Feb 2021 16:03:45 +0100 Subject: Add webp --- gal | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gal') diff --git a/gal b/gal index b7a5c5f..80d6478 100755 --- a/gal +++ b/gal @@ -48,7 +48,11 @@ for f in $PHOTOS/*.{jpg,JPG,jpeg,JPEG,png,PNG}; do [ -f $f ] && cat >> $OUTPUT/index.html < - $filename + + + + $filename + EOF @@ -81,5 +85,6 @@ for f in $PHOTOS/*.{jpg,JPG,jpeg,JPEG,png,PNG}; do filename=$(basename $f) echo "Optimizing $filename" [ -f $f ] && convert -auto-orient -strip -quality $QUALITY -resize x$RESOLUTION "$f" "$OUTPUT/photos/$filename" && \ - convert -auto-orient -strip -quality $QUALITY -resize x$THUMBNAIL_RESOLUTION "$f" "$OUTPUT/thumbs/$filename" + convert -auto-orient -strip -quality $QUALITY -resize x$THUMBNAIL_RESOLUTION "$f" "$OUTPUT/thumbs/$filename" && \ + cwebp -q $QUALITY "$OUTPUT/thumbs/$filename" -o "$OUTPUT/thumbs/${filename%.*}.webp" done -- cgit 1.4.1