The WebP
format is only included in php8 and up: https://docs.platform.sh/languages/php/extensions.html
You could compile it yourself, although it's recommended spending time migrating to php8. There aren't that many backwards incompatible changes. And it gives you a performance boost: https://www.php.net/manual/en/migration80.php
If you do want to compile WebP
yourself, you can do so with brew. There's a brew helper script that you can include in your code.
hooks:
build: |
set -e
bash install_brew_packages.sh webp
The helper script that install_brew_packages.sh
can be found here: https://github.com/matthiaz/platformsh-tools#install_brew_packagessh