Can anyone translate this rewrite from Apache config to Caddyfile

Thank you so much for that, but is it possible to rewrite this url “/wp-content/uploads/2015/04/image1.jpg” to “/wp-content/uploads-webpc/2015/04/image1.jpg.webp” like in that Nginx configuration in my #3 anwser