• Good morning,

    I am testing WebP Express on a multisite installation. So far, I am not having any luck – all self tests seem to work, but the site continues to provide (mostly) jpegs (actual jpegs).

    Interestingly, images contained in the theme used itself seem to get converted, it’s just content that doesn’t.

    I’d appreciate any tips on how to debug this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @nilsjeppe Holla! Can you provide your server config (LAMP/LEMP/etc) and settings of your installation of wp and webp express?
    I have multisite and this plugin works well.

    Thread Starter nilsjeppe

    (@nilsjeppe)

    thanks @vadim-s-sabinich for your reply ??

    It does seem to work somewhat. Test images work, and so do some images hard coded in themes, apparently. In the webp-express directory, I see:

    webp-express]# find . |grep -i \.webp$

    ./webp-images-bigger-than-source/themes/duster/images/search.png.webp
    ./webp-images-bigger-than-source/themes/webp-express-test-images/Bd1ZSK.JPEG.webp
    ./webp-images-bigger-than-source/uploads/webp-express-test-images/rllyVA.JPEG.webp
    ./webp-images/plugins/cookie-law-info/admin/modules/cookies/images/cli_icon.png.webp
    ./webp-images/plugins/cookie-law-info/admin/images/support.png.webp
    ./webp-images/plugins/cookie-law-info/admin/images/documentation.png.webp
    ./webp-images/plugins/cookie-law-info/images/cross.png.webp
    ./webp-images/wp-content/blogs.dir/36/files/2020/01/cropped-gwicon-32×32.jpg.webp
    ./webp-images/themes/hemingway/assets/images/header.jpg.webp
    ./webp-images/themes/twentyten/images/headers/path.jpg.webp
    ./webp-images/themes/twentyten/images/wordpress.png.webp
    ./webp-images/themes/neve/screenshot.png.webp
    ./webp-images/themes/duster/images/search.png.webp`

    (grep for brevity). So the plugin does run. it can convert and write files, etc. but it’s ignoring any and all “content” images.

    I do make heavy use of child themes, mainly to prevent calls to fonts.google.com, which may be noteworthy. It does not seem to make a difference though (a site that doesn’t use a child theme also doesn’t appear to convert images).

    There’s really nothing weird about my lamp stack. It’s apache + MariaDB + php-fpm. PHP version is 7.4 – I tried 8.1 and 8.0 but apparently those cause issues with WP and various plugins and themes so that’s not an option.

    Apache config is absolutely minimal. 2 vhosts per site, one http that redirects to https, one https that points at wordpress:

    <VirtualHost ip:80>
    ServerName https://www.example.com
    ServerAlias example.com

    DirectoryIndex index.html index.php
    DocumentRoot /home/www/wordpress/htdocs/

    CustomLog /var/log/httpd/wordpress.combined.log combined
    ErrorLog /var/log/httpd/wordpress.errors.log

    # mod_deflate
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =example.com [OR]
    RewriteCond %{SERVER_NAME} =www.example.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    </VirtualHost>`

    <IfModule mod_ssl.c>
    <VirtualHost ip:443>
    ServerName https://www.example.com
    ServerAlias example.com

    DirectoryIndex index.html index.php
    DocumentRoot /home/www/wordpress/htdocs/

    CustomLog /var/log/httpd/wordpress.combined.log combined
    ErrorLog /var/log/httpd/wordpress.errors.log

    # mod_deflate
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript

    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem

    Header always set Strict-Transport-Security “max-age=31536000; includeSubDomains; preload”

    </VirtualHost>
    </IfModule>`

    The vhost for *.blog.example.net is identical, except for the domain name. (Reason for separate vhosts is the use of letsencrypt SSL certs, I can’t work with SANs.)

    The only “nonstandard thing” I set outside the vhosts is:

    ExpiresActive on
    ExpiresDefault “access 1 day”
    Header append Cache-Control “public”

    I really doubt that’s related to this issue.

    Relevant plugins might be:

    GDPR Cookie Consent – doesn’t seem to affect the issue (tested on/off)
    Autooptimize – doesn’t seem to affect the issue (tested on/off)
    Jetpack – without the CDN/image acceleration options
    WordPress MU Domain Mapping – For, well, domain mapping (I am not even sure this is still needed)

    Webp Express settings:

    Operation mode varied (default)

    Scope All Content
    Image types both jped and png
    Destination folder separate
    File extension append (it’s greyed out, can’t be changed)
    Destination structure image roots
    Cache control set private one day
    Prevent using webps larger than original disabled

    I haven’t enabled “convert on upload”, and I haven’t tried “bulk convert”.

    Enable direct redirection to existing converted images enabled
    Enable redirection to converter enabled
    Create webp files upon request enabled

    web service and alter html are disabled.

    Available Conversion methods are ImageMagick (php extension) and gd.

    Side note, if I enable “alter html”, it does attempt to replace content images – it alters the html code, but they’re broken (because the images do not exist). Custom header image is untouched and still a jpeg.

    Hmm. If there’s anything else that might be relevant… please let me know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multisite?’ is closed to new replies.