Sorry, my original suggestion was not correct. The root of the problem that I suggested is that
passthru must be a web URL path that your app is ready to handle—not a local file-path route.
I suggest starting fresh from the original
.platform.app.yaml provided by the WordPress Bedrock template and then following the steps below.
Let’s first ensure that web requests for your
uploads-webpc can be answered. This location will be referenced by your
Note: that Wordpress Bedrock uses the file path
Add this to your
This is essentially the same setup as the
wp/wp-content rule. The only difference is the
root location and
webp has been added to the
Now, let’s ensure
/wp/wp-content/uploads checks for webp files
Modify the existing
/wp/wp-content/uploads location to include a second rule. It passes request through the location we defined above—looking for the file name requested, ending with
Finally, if you are using the
webp-converter-for-media plugin to do this, ensure that it can create files as needed by adding this to your
I tested this setup using the
composer require wpackagist-plugin/webp-converter-for-media. I’m unfamiliar with this package, so I may have missed something. Hopefully, this gives you an idea of how to iterate through testing these route rewrites.