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 is however a great websites out there that compresses your PNG and JPEG images for free and really efficiently too! It is: Compress jpeg and png
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:
- Caesium for Windows
- Imageoptim for Mac
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.