MODX Revolution is a plugin that converts image files to webp format.
The binaries are taken from https://github.com/rosell-dk/webp-convert and https://developers.google.com/speed/webp/docs/precompiled
Install & Update bin files cwebp tool
After that, an icon will appear in the upper-right menu. When you click on it, the site directories will be scanned in the background, and a copy of each image in the webp subdirectory will be created. i.e. /assets/logo.png - > /webp/assets/logo.png.webp
Tested on MODX Revolution 2.7.3-pl!
Took a selection of jpg & png, 24382 files, 3385MB.
Everything worked fine, memory consumption is at a peak: on win 6 580 936b, on lin 3 816 368b. Scanning subdirectories took: 191ms SSD, 3123ms HDD. Compression of a single file takes from 28ms to 5800ms. The resulting volume of compressed files: 1005MB, no loss in quality was noticed.
I opened 12 tabs in the browser at the same time, as a result, the encoding went to 12 threads, I have a Ryzen 5 2600X Six-Core processing of all files took about 45 minutes.