Snippets

Etienne Ott jpegoptim einmal alles

You are viewing an old version of this snippet. View the current version.
Revised by Etienne Ott 9deaa0d
# Install jpegoptim
cd ~
wget http://www.kokkonen.net/tjko/src/jpegoptim-1.4.3.tar.gz
tar -zxvf jpegoptim-1.4.3.tar.gz
cd jpegoptim-1.4.3
make
make strip
make install

# Now we want to optimize the assets
cd /var/www/vhosts/bonita-core/themes/Custom/Frontend/assets/

# First create backups
# The articles dir is big, this might take a while and use ~6GB of space
tar czf backup_articles.tar.gz articles
tar czf backup_images.tar.gz images
tar czf backup_outfits.tar.gz outfits

# Compress all assets; jpegoptim automatically skips everything that's not a jpeg
find . -type f -exec jpegoptim --strip-all {} \; > results.out
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.