It doesn’t cease to fascinate me how the world of WordPress is focused on that “turn on and forget” type of solutions. Quite often such solutions are connected to third-party services where your data are uploaded to somebody else’s server and then downloaded back, or the data are then being loaded directly from those servers.
In regard to services for image optimization, these are often limited by some data amount that you can send there. But I am telling myself – why to pay for edits that can be done in the same quality with tools available directly on the server?
I, for example, use a virtual Linode server where I additionally can install a set of apps of my own choice. So I see it as pointless to pay for a cloud service which basically just calls a few programs for photo optimization when I can have those same programs on my server.
I talk about command line tools such as jpegtran, optipng, pngout, pngquant, gifsicle, cwebp and others. I entered to a plug-in search the name of a program optipng and found three plug-ins that work with these tools.
EWWW Image Optimizer and image optimization in WordPress
Indeed, above I have mentioned a free solution and the first choice here is a plug-in that in the WordPress administration offers a connection to its paid cloud service. However it is able to run without it, even though a compression effectivity or data saving are limited then.
Yet I have decided to try out EWWW Image Optimizer. From all three modules that popped up regarding this topic it still offers the most options. After plug-in activation you will in its settings find an optimization indicator which ultimately intends to lure you to buy the paid version.
The settings located below are more interesting. For each graphics type you can set optimization level - meaning erasing useless data from the image without altering its picture information, or change in compression with JPEG. On the list are JPG, PNG, GIF and also PDF.
I set the best options that are offered by the free version. But a real alteration is possible only with PNG, every other format is on the first default level, it is not possible to do anything more with the free version.
I do not change other settings. But it is possible to exclude some of the folders or sizes of previews from these alterations. If you have a problem with the default JPG quality level (82%), you can edit it. You can also turn on the conversion between various formats.
There is also a WebP support and those are being sent to the supported browsers only and originals will stay on the server. I did not turn this on during my test.
EWWW Image Optimizer has an integrated tool for a mass edit of the existing images from your older posts. So I launch it and wait for the result.
I have performed the test on the web Výlety 360. It is a smaller blog with posts that always contain several JPG images. The original size of images was 512 MB. After edits it was 496 MB. And because I load images already optimized by the program Optimage, it is adequate for the basic level of optimization. You will save tens of kilobytes on small previews.
Plug-in EWWW Image Optimizer doesn’t bother you anywhere in the administration with an ad for the premium version so I wouldn’t hesitate to use it on client websites too. Moreover the stated number of active installations speaks definitely positively about this plug-in.
What I contrarily don’t like is the fact that after removing it will leave in the WordPress database two of its tables including auxiliary data about optimized images.
I must add that to use EWWW Image Optimizer there has to be allowed the setting of PHP shell_exec so that it is able to call additional programs. It is nice that if you don’t have them installed directly on the server and you don’t know how to do it, the plug-in offers them for these cases right in the package. So you don’t have to busy yourself with their installation.
Slimage and optimizing using jpegoptim a optipng
Another plug-in that caught my attention is Slimage. The first question right away is a number of active installations and there are at the time I am writing this post only about thirty (EWWW Image Optimizer has about 800 thousand)
It doesn’t have as many settings and options as previous plug-in, it doesn’t generate WebP on request but it also doesn’t force you to buy a premium version. After the installation there is available the maximum of functions that plug-in offers for free.
You can find its settings in the general WordPress form for altering Media functionality. In the default state it is off and that’s why in the end of the form I turn on the option Enable compression on thumbnails during the image upload. I leave the JPEG quality on the default 90 %, PNG on “two” and jpegoptim switch that removes all the needless data and from photos makes progressive images.
Slimage doesn’t have any built-in option of optimizing images that has already been uploaded. It can be solved using various plug-ins such as for example Regenerate Thumbnails or using the command line and WP-CLI.
The original 512 MB of photos optimized Slimage to 449 MB. Considerably better than EWWW in its free version. And even though Slimage has been set to a higher quality of edited JPEGs.
WP Optimizer – not only an image optimization
When searching in the list of plug-ins, WP Optimizer after entering the phrase optipng appeared on the third place. Number of active installation is the same as in the case of Slimage (30+). Besides image optimization it gives you a whole lot of gadgets for making WordPress run faster. For example a regular database optimization.
It probably has the prettiest administration section of all three. Unfortunately I wasn’t able to reliably start it up for it to optimize the whole folder with uploaded images but only particular subfolders.
The choice is clear – optimize WordPress using Slimage
From my point of view it is pretty obvious which plug-in you should pick. Although Slimage has a minimal number of active installations, it works absolutely smoothly with the current WordPress version and the results of optimization process speak for themselves. Connoisseurs can tweak switches used when calling jpegoptim and optipng.
This plug-in in addition doesn’t bother you with an ad for its premium version.
Tip: If your hosting doesn’t allow to launch server tools for optimization of images, take a look at the plug-in reSmush.it. It uses a service of the same name which is cloud-based and returns the image back after optimization. For photos up to 5 MB per file it is completely free. And not only for WordPress.