#kompression
4 Einzeiler mit diesem Stichwort.
Alle Einzeiler mit Tag kompression
CSS-, JS- und SVG-Dateien mit gzip und Brotli vorkomprimieren
$find /var/www/vhosts/example.com/httpdocs/wp-content/themes -type f \( -name '*.css' -o -name '*.js' -o -name '*.svg' \) -exec gzip -k -9 -f {} + -exec brotli -k -f {} +
Ersparnis durch gzip und Brotli für eine URL messen
$for e in identity gzip br; do curl -s -o /dev/null -H "Accept-Encoding: $e" -w "$e: %{size_download} Bytes\n" https://example.com/; done
JPEG-Qualität mit jpegoptim auf einen Höchstwert begrenzen
$find /var/www/vhosts/example.com/httpdocs/wp-content/uploads -type f \( -iname '*.jpg' -o -iname '*.jpeg' \) -exec jpegoptim --strip-all --preserve --max=82 {} +
PNG-Bilder verlustbehaftet mit pngquant verkleinern
$find /var/www/vhosts/example.com/httpdocs/wp-content/uploads -type f -iname '*.png' -exec pngquant --quality=65-85 --skip-if-larger --strip --force --ext .png {} +