Compress WordPress images

//Compress WordPress images

Compress WordPress images

You can compress WordPress images without losing quality. Yes you read that right. This is called lossless image compression, it will typicalle reduce image size by 20% to 80%. That is a lot!

If you want to compress images for speed, don’t forget to read out WordPress speed optimization checklist.

We will run through a couple of ways to compress your images:

  • Easy: compress single images
  • Easy: By plugin
  • Middle:By ftp
  • Advanced: Through SSH

Compress single images

This is easy. Most designers will use Photoshop to do this. There are however two great websites out there that compress your PNG and JPEG images for free and really efficiently too! The are:

Simply upload your image and wait a minute. I’ve has up to 95% compression on images with a bunch on very bright or very dark images.

Compress WordPress images through a plugin

One of our favorite plugins (smush.it) is going to retire. Some other popular plugins are:

Compress by using FTP

You don’t actually optimize using the FTP protocol, what you do is:

  • Download your images over  ftp
  • Batch optimize them
  • Upload them through FTP

First, install:

Now what you do it:

  • Open your website through FTP
  • Download the entire /wp-content/uploads/ folder
  • Batch optimize the images in there
  • Upload the folder back to your website

Pro: optimize through SSH

If you donlt know what this is, leave it alone. If you so have SSH access, you are going to have a good time!

First install Trimage, for Ubuntu/Debian:

sudo apt-get install trimage

Now navigate to your uploads folder:

cd /wp-content/uploads/

Verify that you are in the uploads folder by typing ls.

You can now run the batch command to compress everything:

trimage -d *

Which means: Trimage, compress directory *. Where * means everything.

Conclusion

There are a bunch of ways out there to compress images, make sure that this process is part of your WordPress SEO and speed optimization routine when building websites.

By | 2018-07-24T15:14:26+00:00 April 19th, 2015|0 Comments