• Resolved CarolineElisa

    (@carolineelisa)


    We have a page containing images that have had WebP versions generated, yet even after clearing the page and minify caches PageSpeed Insights is still showing ‘Serve images in next-gen formats’ for these images.

    Am I missing something?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Would you be able to provide the site URL so I can take a look?

    Thread Starter CarolineElisa

    (@carolineelisa)

    Plugin Support vupdraft

    (@vupdraft)

    It looks like your WebP Images are generated but not served.

    Generally this happens for the following reasons

    1. You are on a ngix server and you  apply custom rules to nginx.conf file manually. If this is the case, please add this to your ngix.conf.
    <IfModule mod_setenvif.c>
    
    # Vary: Accept for all the requests to jpeg, png, and gif.
    
    SetEnvIf Request_URI "\.(jpg|jpeg|jpe|png|gif)$" REQUEST_image
    
    </IfModule>
    
    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    
    RewriteBase /
    
    # Check if browser supports WebP images.
    
    RewriteCond %{HTTP_ACCEPT} image/webp
    
    # Check if WebP replacement image exists.
    
    RewriteCond %{REQUEST_FILENAME}.webp -f
    
    # Serve WebP image instead.
    
    RewriteRule (.+)\.(jpg|jpeg|jpe|png|gif)$ $1.$2.webp [T=image/webp,NC]
    
    </IfModule>
    
    <IfModule mod_headers.c>
    
    Header append Vary Accept env=REQUEST_image
    
    </IfModule>

    2. mod_rewrite is not active on the server (Apache)

    Thread Starter CarolineElisa

    (@carolineelisa)

    Thanks for your reply.

    mod_rewrite is active on the server (Apache)

    What else could be the issue? A conflicting plugin?

    Plugin Support vupdraft

    (@vupdraft)

    Serving webp images also uses these modules  mime and headers

    Could you please visit wp-admin/options.php and see what the values are for these options

    https://prnt.sc/U6mIk-Vs4zfy

    Thread Starter CarolineElisa

    (@carolineelisa)

    Both wp-optimize-redirection_possible and wp-optimize-rewrite_status are true

    mime and headers are also enabled on the server

    Could there be a problem writing to .htaccess? Or..?

    Thread Starter CarolineElisa

    (@carolineelisa)

    We had other image compression plugins active before, could this be part of the problem?

    We also use Wordfence and Cloudflare…

    Plugin Support vupdraft

    (@vupdraft)

    Can you clear your cloudflare cache?

    I suspect this might be the root of the issue.

    Thread Starter CarolineElisa

    (@carolineelisa)

    We have removed Cloudflare completely and cleared the WP-Optmize cache. Issue persists

    But I did notice that when I right click > save the site logo, the file is WebP

    Other images are not, even though they have all been compressed

    Why might that be? Because I compressed the logo more recently?

    Plugin Support vupdraft

    (@vupdraft)

    It doesn’t look like all of your images are actually in WebP format.

    For example, this image:https://www.sgtmartinho.com/wp-content/uploads/2023/07/2.-Background-1-scaled-375×375.jpg

    There is no WebP version: https://www.sgtmartinho.com/wp-content/uploads/2023/07/2.-Background-1-scaled-375×375.jpg/web

    With WPO WebP versions are only created for newly added images so it may be that you need to add the images again.

    Thread Starter CarolineElisa

    (@carolineelisa)

    Thank you, but we have hundreds of images and adding them all again is not feasible

    So the bulk compress feature doesn’t work, is that right? That is what we used to compress many of our images

    Plugin Support vupdraft

    (@vupdraft)

    The bulk compress feature works but at the moment you can only create WebP versions of newly added images (the method for creating WebP images is different than the one for compressing images). Compressing images and serving them in a next gen format (WebP) is not the same.

    We should have the functionality to convert all WebP images coming soon though. I have checked our development and it is currently on the list for “next release”

    Thread Starter CarolineElisa

    (@carolineelisa)

    That is great news! Hopefully with the next release we will be able to convert all our images to WebP

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PageSpeed Insights still showing ‘Serve images in next-gen formats’’ is closed to new replies.