If you use Magento 2 WebP Images Extension and the CLI conversion by the bin/magento magefan:webp:convert command is run very long, the issue may be in cwebp library on your server. WebP extension works in a way to check if the proper software is installed on the server first and then use its own binary files if there is no software installed. So if you already have the cwebp lib on the server, then the extension will use it.

Cwebp on the server can be outdated, please try to update or reinstall the cwebp.

If for some reason you are not able to update it, try to modify the following file:

/lib/internal/Magefan/Lib/WebPConvert/Convert/Converters/Cwebp.php

or

vendor/rosell-dk/webp-convert/src/Convert/Converters/Cwebp.php

Find method discoverCwebpBinaries and comment the lines like on a screenshot:

WebP Conversion Takes Too Long in Magento 2

The result will look like this:

Magento 2 WebP Images Convertion Takes Too Long

If this does not help, please contact us.