• We tried Operation mode:
    1. Varied image response
    2. CDN Friendly
    and it’s the same

    Copying JPEG to index folder (webp-express-test-images/nMaPI3.JPEG). ok
    We now have a jpeg stored here:
    /bitnami/wordpress/webp-express-test-images/nMaPI3.JPEG
    Lets check that browsers supporting webp gets a freshly converted WEBP when a non-existing WEBP is requested, which has a corresponding source
    Making a HTTP request for the test image (pretending to be a client that supports webp, by setting the “Accept” header to “image/webp”)
    Request URL:
    The remote request errored
    The test FAILED
    Why did it fail? It could either be that the redirection rule did not trigger or it could be that the PHP script could not locate a source image corresponding to the destination URL. Currently, this analysis cannot dertermine which was the case and it cannot be helpful if the latter is the case (sorry!). However, if the redirection rules are the problem, here is some info:
    Diagnosing redirection problems (presuming it is the redirection to the script that is failing)
    Running a special designed capability test to test if rewriting works with .htaccess files
    Result: Yes, rewriting works.
    It seems something is wrong with the .htaccess rules then. You could try to change “Destination structure” – the rules there are quite different.
    It could also be that the server has cached the configuration a while. Some servers does that. In that case, simply give it a few minutes and try again.
    Note that if you cannot get redirection to work, you can switch to “CDN friendly” mode and rely on the “Alter HTML” functionality to point to the webp images. If you do a bulk conversion and make sure that “Convert upon upload” is activated, you should be all set. Alter HTML even handles inline css (unless you select “picture tag” syntax). It does however not handle images in external css or which is added dynamically with javascript.

    
    .htaccess files that WebP Express have placed rules in the following files:
    - /bitnami/wordpress/wp-content/uploads/.htaccess
    - /bitnami/wordpress/wp-content/themes/.htaccess
    - /bitnami/wordpress/wp-content/plugins/.htaccess
    - /bitnami/wordpress/wp-content/.htaccess
    - /bitnami/wordpress/wp-content/webp-express/webp-images/.htaccess
    WebP rules in uploads:
    # Rules for handling requests for source images
    # ---------------------------------------------
    
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
    </IfModule>
    
    WebP rules in themes:
    # Rules for handling requests for source images
    # ---------------------------------------------
    
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
    </IfModule>
    
    WebP rules in plugins:
    # Rules for handling requests for source images
    # ---------------------------------------------
    
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
    </IfModule>
    
    WebP rules in wp-content:
    # Rules for handling requests for source images
    # ---------------------------------------------
    
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
    </IfModule>
    
    WebP rules in cache:
    
    # Rules for handling requests for webp images
    # ---------------------------------------------
    
    # WebP Realizer: Redirect non-existing webp images to webp-realizer.php, which will locate corresponding jpg/png, 
    # convert it, and deliver the freshly converted webp
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule (?i).*(\.jpe?g|\.png)\.webp$ /wp-content/plugins/webp-express/wod/webp-realizer.php [E=WE_WP_CONTENT_REL_TO_PLUGIN_DIR:../,E=WE_DESTINATION_REL_HTACCESS:$0,E=WE_HTACCESS_ID:cache,NC,L]
    </IfModule>
    
    # Set Vary:Accept header if we came here by way of our redirect, which set the ADDVARY environment variable
    # The purpose is to make proxies and CDNs aware that the response varies with the Accept header
    <IfModule mod_headers.c>
      <IfModule mod_setenvif.c>
        # Apache appends "REDIRECT_" in front of the environment variables defined in mod_rewrite, but LiteSpeed does not
        # So, the next lines are for Apache, in order to set environment variables without "REDIRECT_"
        SetEnvIf REDIRECT_EXISTING 1 EXISTING=1
        SetEnvIf REDIRECT_ADDVARY 1 ADDVARY=1
    
        Header append "Vary" "Accept" env=ADDVARY
    
      </IfModule>
    </IfModule>
    
    # Register webp mime type 
    <IfModule mod_mime.c>
      AddType image/webp .webp
    </IfModule>
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author rosell.dk

    (@roselldk)

    Ok. I also got a failure on INDEX here. I probably should remove the “Everything” option from the “Scope” option, as it is likely to go wrong. Or at least let it come with a warning.

    Thanks for reporting.
    And of course you should now change “Scope” to something less radical. Ie “Uploads and themes”

    • This reply was modified 5 years, 6 months ago by rosell.dk.
    Thread Starter Sam

    (@sam2002)

    Great

    Thread Starter Sam

    (@sam2002)

    Coffee on me – enjoy it

    Plugin Author rosell.dk

    (@roselldk)

    Thanks ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Self testing – INDEX failed version Version 0.16.0’ is closed to new replies.