Working on Multisite instance ?
-
Hi,
I have activated the plugin on the my wordpress network:
– the “setting” option on the admin dashboard does nothing (remain on the plugin page)
– the “setting” option from my glob returns a 500 error.Running on windows 10 with iis.
Wordpress version 5.4.1Thank you
-
Hi @olifan,
Thank you for your message.
I have prepared for you a beta version of the plugin: https://gbiorczyk.pl/webp-converter-for-media-v1.2.5.zip
Please download it and let me know if the warning has disappeared. If so, in the next update I will add this change and you will leave it with you.
Hi,
Thank you very much for this update !
Installation works fine and I can now access the settings from individual blog.I can see that uploads trigger webp thumbnails (for example on : C:\inetpub\wwwroot\wp-content\uploads-webpc\sites\6\2020\05)
How to check this is the webp version which is used, as I can still see the jpeg link on the page source behind the picture.
But the source contents shows this script point at a webp file:
var loaderRandomImages = [“https:\/\/blog.druet.org\/1sec\/wp-content\/uploads\/sites\/6\/2020\/04\/1sec-_MG_9381_DxOm.webp”];
Do you confirm that there are no web server rewrite rules as I am running on IIS, which would mean some manual settings.
Thank you
I am glad that the changes have helped. Tell me please, did you read the plugin FAQ? There you have to explain how the plugin works.
Hi,
I checked the FAP, and the network -> img debug page on browser.
Images type remains jpeg and not webp.I tried with another image from the start, image is correctly loaded here:
“C:\inetpub\wwwroot\wp-content\uploads\sites\6\2020\05\1sec-_MG_1887_DxO.jpg”and converted here:
“C:\inetpub\wwwroot\wp-content\uploads-webpc\sites\6\2020\05\1sec-_MG_1887_DxO.jpg.webp”but the page where it is displayed seems still jpeg, confirmed by the object size (2.9 Mo for jpeg and only 688ko for webp).
Could it be that folder location changes on multisites, as you FAQ gives a different path : /wp-content/uploads-webpc/2019/06/example.jpg.webp.
Multisites involved a site # before the year.
Thank you
I did not mention that I cleared the cache, and tested on both Firefox and Edge.
Tested on an article, but also on a gallery embeded into a portfolio from theme Timber Lite.Could you send me the contents of the .htaccess file from the
C:\inetpub\wwwroot\wp-content\uploads\
location?# BEGIN WebP Converter
# ! — DO NOT EDIT PREVIOUS LINE — !
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpg.webp -f
RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,E=cache-control:private,L]
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpeg.webp -f
RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,E=cache-control:private,L]
</IfModule>
# ! — DO NOT EDIT NEXT LINE — !
# END WebP ConverterPlease give me the URL of your website.
Hi, you can check this test page which was loaded with JPEG anf your plugin:
https://blog.druet.org/1sec/2020/05/09/530/Rest of the site is not yet converted.
I understand that .htaccess files are not managed by IIS.
I have the url rewrite module V2 installed.
Should I import some rules ?Yes, check .htaccess files in
/uploads
and/uploads-webpc
. Unfortunately, I don’t have strict configuration for IIS.Can you contact your server’s administrator and try to rewrite these rules for IIS?
This is a self hosted instance; I am the boss ??
I will try to import rules.Hi,
I finaly managed to make it work in IIS, using a module for analysis failed requests (which gives the effective rewrite results).
I didn’t use the upload .htacces files, which merely seems to allow webp (I have the plugin WP Enable WebP installed).
Here are the 2 rules of my web.config file.
It is purposely filtered for the 1sec blog, as I don’t wan’t yet to convert the others. Maybe not optimized but at least working !<rule name=”1sec JPG vers WEBP” enabled=”true” stopProcessing=”true”>
<match url=”^1sec/wp-content/uploads/sites/([0-9]+)/([0-9]+)/([0-9]+)/([_0-9a-z-]+).(jpg)$” />
<conditions logicalGrouping=”MatchAll” trackAllCaptures=”false”>
<add input=”{HTTP_ACCEPT}” pattern=”image/webp” />
</conditions>
<action type=”Rewrite” url=”wp-content/uploads-webpc/sites/{R:1}/{R:2}/{R:3}/{R:4}.jpg.webp” appendQueryString=”true” logRewrittenUrl=”false” />
</rule>
<rule name=”1sec JPEG vers WEBP” enabled=”true” stopProcessing=”true”>
<match url=”^1sec/wp-content/uploads/sites/([0-9]+)/([0-9]+)/([0-9]+)/([_0-9a-z-]+).(jpeg)$” />
<conditions logicalGrouping=”MatchAll” trackAllCaptures=”false”>
<add input=”{HTTP_ACCEPT}” pattern=”image/webp” />
</conditions>
<action type=”Rewrite” url=”wp-content/uploads-webpc/sites/{R:1}/{R:2}/{R:3}/{R:4}.jpg.webp” appendQueryString=”true” logRewrittenUrl=”false” />
</rule>just noticed a small error in the last sentence:
<action type=”Rewrite” url=”wp-content/uploads-webpc/sites/{R:1}/{R:2}/{R:3}/{R:4}.jpeg.webp” appendQueryString=”true” logRewrittenUrl=”false” />
</rule>jpeg and not jpg of course (wrong paste).
Now I owe you some pints of beers ??
- The topic ‘Working on Multisite instance ?’ is closed to new replies.