Written by James McDonald

September 29, 2011

I’m noodling away at my websites performance using the Google Page Speed plugin.

It recommends losslessly compressing your images using a number of utilities.

I mostly upload png format images so I ran the following on my WordPress content folder to compress the images.

# install both the jpegtran and optipng compression tools
apt-get install libjpeg-progs
apt-get install optipng 

# change to your wordpress content directory
cd /path/to/your/wordpress/wp-content

# run a command to find and compress all your png's
# this will take a while if you have been blogging a lot of images
find  . -type f  -name *.png | xargs -IFILE optipng FILE

# clear your browser cache and rerun Page Speed 
# to see if you have made an improvement. 
# (I went from 90 to 91 on my page speed rank)

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...