Snippets

Etienne Ott jpegoptim einmal alles

You are viewing an old version of this snippet. View the current version.
Revised by Etienne Ott 4eb57b7
# 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.tar.gz
make
make strip
make install

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

# The articles dir is too big, zipping a > 1TB dir is not a good idea
# 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.