Support » Plugin: WebP Express » Nginx some Woocommerce images broken

  • LNN


    Hi, thanks for this awesome plugin,
    I am on NGINX, the plugin is working fine on home and archive pages, but it doesn’t serve Webp on product pages and some images on Woocommerce products are broken, tried all possible options without any luck, here is the code I used inside the server directive:

    # Redirect all HTTP traffic to HTTPS
    server {
       listen ****;
       listen [::]:*****;
       return 301 https://$host$request_uri;
       include /var/www/html/nginx.conf;
      # Rocket-Nginx configuration
      include rocket-nginx/default.conf;
      # WebP Express rules
      # --------------------
      location ~* ^/?wp-content/.*\.(png|jpe?g)$ {
        add_header Vary Accept;
        # expires 365d;
        if ($http_accept !~* "webp"){
          /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename wp-content=wp-content
      # ------------------- (WebP Express rules ends here)

    My settings are as follow:

    Some examples of broken pages:

    Thanks for verifying what have I missed here.

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

  • The topic ‘Nginx some Woocommerce images broken’ is closed to new replies.