draussenfunker.github.io/optimize.sh
Julius Zeidler f52ca09d2e testing
2024-06-01 20:21:36 +00:00

3 lines
No EOL
311 B
Bash
Executable file

#!/bin/bash
echo "running image optimization"
npx sharp-cli resize 800 --withoutEnlargement true --optimise true --progressive true --withMetadata false --input $(find ./docs \( -name cache -prune \) -o -name '*' -type f -exec file {} \; | awk -F: '{ if ($2 ~/[Ii]mage|EPS/) print $1}') --output "{dir}/{base}"