Added script
This commit is contained in:
parent
308ba0f49b
commit
cdea419a02
|
@ -0,0 +1,3 @@
|
|||
public
|
||||
!.gitkeep
|
||||
cwebp
|
|
@ -0,0 +1,4 @@
|
|||
wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.2-rc1-linux-x86-64.tar.gz
|
||||
tar -xf *.tar.gz
|
||||
mv libwebp-*/bin/cwebp .
|
||||
rm -r libwebp-*
|
|
@ -0,0 +1,13 @@
|
|||
mkdir public
|
||||
mkdir public/small
|
||||
mkdir public/medium
|
||||
mkdir public/large
|
||||
|
||||
|
||||
|
||||
echo "Working on large images"
|
||||
|
||||
for f in ../strapi.accords-library.com/public/uploads/*; do
|
||||
filename=$(basename "$f")
|
||||
./cwebp -short -m 6 -q 80 -alpha_q 80 -mt -resize 0 2048 $f -o public/large/${filename%.*}.webp
|
||||
done
|
Loading…
Reference in New Issue