• Resolved Anonymous User 13716511

    (@anonymized-13716511)


    I’ve optimized the images the google speed test recommended. However, when I test to see if the webp format exists I get a 404 error despite it saying Webp generated:Yes in the view details of the image section.
    Do I need to restart my server to see if the webp images exist?
    They are definitely not loading on my homepage.
    I have a VPS server. Would restarting it affect any of the other sites on the server?
    How do I restart it?

    Thanks

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WP Media

    (@wp_media)

    Hi @lucytech

    Most probably WebP is not generated for some thumbnails.

    Are you looking for WebP for image.jpg (example) or image-123×456.jpg (example, replace 123×456 with some other numbers – width/height of the thumbnail)?

    If the latter one, it means WebP is not generated for the specific thumbnail and you should try to generate it from Imagify Settings page.

    Server should not be restarted as it would not change anything in fact.

    Restarting it should not affect other websites (maybe just for the very short time, but should not be dramatic), but there is no need to do it for Imagify related tasks.

    Let me know if it is possible to share your website URL so we could check.

    Best Regards
    Marko

    Thread Starter Anonymous User 13716511

    (@anonymized-13716511)

    website url:
    https://themtwashingtongroup.com/
    I am looking at the images on the homepage such as
    https://themtwashingtongroup.com/wp-content/uploads/2020/02/baltimore-panorama-web.jpg.webp
    I can see now that the .webp does exist but how do I make it load instead of the .jpg?

    Plugin Author WP Media

    (@wp_media)

    Hi @lucytech

    Can you tell me what method of displaying WebP you are using?

    It looks like it is rewrite rules method, which would not work if you didn’t add NGINX rules for WebP to nginx.conf.

    The image you mentioned is background image, so it would not work with “<picture” tag method.

    Can you confirm you use rewrite rules? Once you add NGINX rules (you can see them once you activate the option in Imagify Settings), you have to reset NGINX so it takes effect.

    Best Regards
    Marko

    Thread Starter Anonymous User 13716511

    (@anonymized-13716511)

    I’ve checked the plugin box to use the rewrite rules.
    What do you mean by this:
    Once you add NGINX rules (you can see them once you activate the option in Imagify Settings).
    I can’t see any rules.

    If I add the rewrite rules and reset NGINX will all images I add in the future and create as WebP work or will I need to reset NGINX it every time?

    Also I am on a VPS server. Can the rewrite rules or resetting the server cause any damage to any sites?

    Plugin Author WP Media

    (@wp_media)

    Hi @lucytech

    These are rules to add to nginx.conf:

    location ~* ^(/.+)\.(jpg|jpeg|jpe|png|gif)$ {
      add_header Vary Accept;
    
      if ($http_accept ~* "webp"){
        set $imwebp A;
      }
      if (-f $request_filename.webp) {
        set $imwebp  "${imwebp}B";
      }
      if ($imwebp = AB) {
        rewrite ^(.*) $1.webp;
      }
    }

    There is no need to restart NGINX every time, it is only when you add the code to nginx.conf file.

    There won’t be issues as long as the code is added properly (you can add it at the end of the file). It would be good to test websites by visiting them, just to be sure it is all good. If not, you can remove this code and reset the NGINX again (and let us know if this happen).

    Best Regards
    Marko

    Thread Starter Anonymous User 13716511

    (@anonymized-13716511)

    I added the code but the WebP versions are still not showing on my site.
    The exist but they aren’t loading.
    I have them for all three main images on the homepage. https://themtwashingtongroup.com/
    but google page speed is still showing the .jpg version.

    How do I fix this?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘restart server’ is closed to new replies.