I have installed the third-party tools on the server to optimize images and I still get “Image Optimization Tool is not installed” message.

The Google Page Speed Optimizer uses four third-party tools to optimize images, such as jpegoptim, optipng, gifsicle and cwebp. 

In case the tool is installed on the server and the extension still shows the message “Image Optimization Tool cwebp is not installed” (the content of the message may differ depending on the tool which is not visible for the extension), the actual path to the tools should be indicated in the extension files.

Here is the example for WebpOptimization tool configuration with added path to the corresponding file: /code/Amasty/PageSpeedOptimizer/Model/OptionSource/WebpOptimization.php

The whole directory should be added to the nodes: command, command and result.

<?php

namespace Amasty\PageSpeedOptimizer\Model\OptionSource;

class 
WebpOptimization
{
    const 
WEBP = [
        
'name' =>  'cwebp',
        
'command' => 'usr/bin/cwebp %f -o %o',
        
'check' => [
            
'command' => 'usr/bin/cwebp -help',
            
'result' => 'usr/bin/cwebp [options]'
        
]
    ];
}

Thus the same code modification should be made with the following files depending on the tool which is indicated in the error message:

app/code/Amasty/PageSpeedOptimizer/Model/OptionSource/JpegOptimization.php

app/code/Amasty/PageSpeedOptimizer/Model/OptionSource/PngOptimization.php

app/code/Amasty/PageSpeedOptimizer/Model/OptionSource/GifOptimization.php

In addition to this, if the extension is installed via composer, the necessary files can be found in the following directory: vendor/amasty/module-page-speed-optimizer/Model/OptionSource/ .

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.