• Resolved followalter

    (@followalter)


    Hi, I have your plugin installed on a multisite installation and it’s not loading the webp files: https://autentic.world/. The installation has multiple domains using the same wordpress installation. The converter plugin is ‘network active’ and I’ve generated all the webp files correctly.

    There is also a generated htaccess file in the wp-content folder (which i’ve renamed to content) with all the rewrite rules. I’ve tested this file by adding ‘test’ as the first line, and no files from the uploads are loading then, so the server is using that htaccess file correctly. The file looks like this:

    BEGIN Converter for Media ! --- DO NOT EDIT PREVIOUS LINE --- !


    RewriteEngine On
    RewriteOptions Inherit

    RewriteCond %{QUERY_STRING} original$
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule . - [L]

    RewriteCond %{HTTP_ACCEPT} image/avif
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{DOCUMENT_ROOT}/content/uploads-webpc/$1.jpg.avif -f
    RewriteRule (.+).jpg$ /content/uploads-webpc/$1.jpg.avif [NC,T=image/avif,L]
    RewriteCond %{HTTP_ACCEPT} image/avif
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{DOCUMENT_ROOT}/content/uploads-webpc/$1.png.avif -f
    RewriteRule (.+).png$ /content/uploads-webpc/$1.png.avif [NC,T=image/avif,L]
    RewriteCond %{HTTP_ACCEPT} image/avif
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{DOCUMENT_ROOT}/content/uploads-webpc/$1.webp.avif -f
    RewriteRule (.+).webp$ /content/uploads-webpc/$1.webp.avif [NC,T=image/avif,L]
    RewriteCond %{HTTP_ACCEPT} image/avif
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{DOCUMENT_ROOT}/content/uploads-webpc/$1.jpeg.avif -f
    RewriteRule (.+).jpeg$ /content/uploads-webpc/$1.jpeg.avif [NC,T=image/avif,L]

    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{DOCUMENT_ROOT}/content/uploads-webpc/$1.jpg.webp -f
    RewriteRule (.+).jpg$ /content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,L]
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{DOCUMENT_ROOT}/content/uploads-webpc/$1.png.webp -f
    RewriteRule (.+).png$ /content/uploads-webpc/$1.png.webp [NC,T=image/webp,L]
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{DOCUMENT_ROOT}/content/uploads-webpc/$1.jpeg.webp -f
    RewriteRule (.+).jpeg$ /content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,L]

    Header always set Cache-Control "private" Header append Vary "Accept" ! --- DO NOT EDIT NEXT LINE --- ! END Converter for Media Test.

    I’ve installed the plugin on the same server for a staging site which isn’t a multisite setup, and is does work there. I don’t see any differences in that setup: https://staging.revelry.rocks/

    For debugging, I’ve added a phpinfo file in the content folder of the multisite setup: https://autentic.world/content/test.php.

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @followalter,

    Thank you for your message.

    Some files are loaded in WebP format. Below I have attached the tutorial describing how to test the plugin:
    https://mattplugins.com/docs/how-to-test-converter-for-media-plugin

    However, some files are not loaded in WebP format and we need to check why. First of all, please tell me if you have optimized 100% of the images on your site.

    Best,
    Mateusz

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @followalter I already know why some images are not available in WebP format. Your images were previously compressed and after converting to WebP these files are not smaller than the original ones, so the plugin uses the original images. These are the limitations of WebP format.

    In this situation, I recommend you to try the AVIF format on your website. I did an analysis to learn more about the potential benefits of using the AVIF format for you. Images converted to the AVIF format on your website will weigh 50% less than images converted to WebP only, maintaining even better image quality. Then all images should be available in the next generation format, because images in AVIF format weigh significantly less.

    Thread Starter followalter

    (@followalter)

    Ah, I apparently looked only at the jpg images. Now I see the webp images too. Thanks for checking and explaining!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.