Created
January 27, 2020 19:00
-
-
Save gwelser/a778169a47b59467f08fbe4ae1a5087e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # WebP Express rules | |
| # -------------------- | |
| location ~* ^/?wp-content/.*\.(png|jpe?g)$ { | |
| add_header Vary Accept; | |
| expires 365d; | |
| if ($http_accept !~* "webp"){ | |
| break; | |
| } | |
| try_files | |
| /wp-content/webp-express/webp-images/doc-root/$uri.webp | |
| $uri.webp | |
| /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content | |
| ; | |
| } | |
| # Route requests for non-existing webps to the converter | |
| location ~* ^/?wp-content/.*\.(png|jpe?g)\.webp$ { | |
| try_files | |
| $uri | |
| /wp-content/plugins/webp-express/wod/webp-realizer.php?xdestination=x$request_filename&wp-content=wp-content | |
| ; | |
| } | |
| # ------------------- (WebP Express rules ends here) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment