If you go to the top menu “Manage” → “Reports” → “System Info” and then click on “View” on the line “phpinfo():” and scroll down to the section “gd”, can you check if “WebP Support” is enabled?
PHP 7.1 is long past end of life (as of December 2019). The current PHP 7 version of PHP 7.4 is EOL as of November 2022. I’d make sure you choose a different version of PHP or move to a machine or host that doesn’t run severely out of date software (which is a risk of compromise unless under some form of maintenance agreement for self-patching).
@bwente Did you update the property “imageExtensions” of your Media Source?
(In the top menu go to “Media” → “Media Source”, Right-Click on the Media Source and select “Update Media Source”, then add “webp” to the list in the property “imageExtensions”.)