···11-#!/bin/bash
22-33-if command -v jpegoptim >/dev/null 2>&1 ; then
44- echo "jpegoptim found"
55- find ./dist \( -iname "*.jpg" -o -iname "*.jpeg" \) | jpegoptim -p -P --files-stdin -w $(nproc --all)
66-else
77- echo "jpegoptim was not found! install either with your package manager or get the binary from the github"
88- echo "https://github.com/tjko/jpegoptim/releases/latest"
99-fi
11+find ./dist \( -iname "*.jpg" -o -iname "*.jpeg" \) | jpegoptim -p -P --files-stdin -w $(nproc --all)
22+oxipng -o max -a -r ./dist
1031111-if command -v oxipng >/dev/null 2>&1 ; then
1212- echo "oxipng found"
1313- oxipng -o max -a -r ./dist
1414-else
1515- echo "oxipng was not found! install with your package manager, cargo or get the binary from the github"
1616- echo "https://github.com/shssoichiro/oxipng/releases/latest"
1717-fi