Plugin Author
kubiq
(@kubiq)
Hi,
I’ve tested this plugin on Local by Flywheel NGiNX and also on Finland server with NGiNX and everything works, but NGiNX is much more complicated then Apache, so yes, sometimes there is very specific configuration.
You should ask your developer for help, or you can write your request on support.kubiq.sk
Plugin Author
kubiq
(@kubiq)
Well yes, that wp_die will run only when the webp is not loaded properly – that’s the point of that testing file… so removing it makes no sense, because yes, then you can activate the plugin, but it will not work.
When you want to use CDN then you don’t need any plugin, as all popular CDNs have their own image processing and WebP delivery mechanism.
Or you can use only CDN for images, something like https://wordpress.org/plugins/auto-cloudinary/
But i copied exactly the code the instruction gave me. Just that you can’t add a location block directly to the nginx conf file.
so goes like
map $http_accept $webp_suffix {
…
}
server {
location ~* ^/wp-content/.+\.(png|gif|jpe?g)$ {
…..
}
}
or in the server block inside the sub folder.
What does CURLINFO_SIZE_DOWNLOAD > 100 check exactly?
-
This reply was modified 2 years, 6 months ago by
hellpunch.
-
This reply was modified 2 years, 6 months ago by
hellpunch.
-
This reply was modified 2 years, 6 months ago by
hellpunch.
-
This reply was modified 2 years, 6 months ago by
hellpunch.
-
This reply was modified 2 years, 6 months ago by
hellpunch.
Plugin Author
kubiq
(@kubiq)
For example on Local by Flywheel, you should add
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
to /conf/nginx/nginx.conf.hbs somewhere before/after other maps
and then add
location ~* ^/wp-content/.+\.(png|gif|jpe?g)$ {
add_header Vary Accept;
try_files $uri$webp_suffix $uri =404;
}
to /conf/nginx/site.conf.hbs somewhere before/after other locations
and the most important thing is TO RESTART YOUR SERVER
then you can activate the plugin and everything works – just tested right now š
Again, doesn’t work.
The code checks if CURLINFO_SIZE_DOWNLOAD is > 100 and then kills the plugin activation with wp_die if that condition is true. I print out $filesize and it shows me “435”.
-
This reply was modified 2 years, 6 months ago by
hellpunch.
Plugin Author
kubiq
(@kubiq)
So then answer is easy – your server doesn’t support WebP.
What does that even mean, how is that gd and imagick show webp enabled when my server shouldn’t support it then?
Plugin Author
kubiq
(@kubiq)
You need to communicate with your hosting provider or someone who has access to your server and is more experienced
I can not help you more from here
Good luck