feat: Add webp convertion
This commit is contained in:
parent
22e23b0162
commit
08c42b16fa
File diff suppressed because it is too large
Load Diff
|
@ -5,6 +5,7 @@
|
|||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"imagemin-cli": "^6.0.0",
|
||||
"imagemin-webp": "^6.0.0",
|
||||
"richtypo": "4.0.7",
|
||||
"richtypo-rules-common": "4.0.2",
|
||||
"richtypo-rules-fr": "4.0.2"
|
||||
|
|
|
@ -84,7 +84,7 @@ optimizer() {
|
|||
echo "🖼️ Optimisation des images"
|
||||
echo
|
||||
# $SCRIPT_DIR/../node_modules/.bin/imagemin $PWD/static -o $PWD/static
|
||||
find ./static ./content -type f | xargs -I % bash -c '$0/../node_modules/.bin/imagemin % -o $(dirname %)' $SCRIPT_DIR
|
||||
find ./static ./content -type f \( -iname \*.jpg \) | xargs -I % bash -c '$0/../node_modules/.bin/imagemin % --plugin.webp.quality=95 > $(dirname %)/$(basename % | sed "s/\(.*\)\..*/\1/").webp' $SCRIPT_DIR
|
||||
}
|
||||
|
||||
optimizer_git_image() {
|
||||
|
|
Loading…
Reference in New Issue