Open pecedev opened 4 years ago
Hi. I managed to do it by adding this code to the nginx server conf:
# --------------------
location ~* ^/app/.*\.(png|jpe?g)$ {
add_header Vary Accept;
expires 365d;
}
location ~* ^/app/.*\.webp$ {
expires 365d;
if ($whattodo = AB) {
add_header Vary Accept;
}
}
if ($http_accept ~* "webp"){
set $whattodo A;
}
if (-f $request_filename.webp) {
set $whattodo "${whattodo}B";
}
if ($whattodo = AB) {
rewrite ^(.*) $1.webp last;
}
if ($whattodo = A) {
rewrite ^/app/.*\.(jpe?g|png)$ /app/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=app break;
}
# ------------------- (WebP Express rules ends here)```
Hi,
After installing the webp express plugin on wordpress bedrock i receive this error: "Failed migrating webp express options to 0.15.1. Probably you need to grant write permissions in your wp-content folder."
The problem is bedrock does not use wp-content folder and goes through site/web/app/uploads and not wp-content/uploads.
Is there any tutorial how to install webp express plugin in wordpress bedrock?
Thanks