Support » Plugin: WebP Express » WebP images not being served

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author rosell.dk

    (@roselldk)

    It seems you are using a CDN, right?

    I see that the logo is on this URL:
    http://cdn.thehinh.com/2018/02/logo-the-hinh-trang-min.png

    You should probably switch to “CDN friendly” mode.

    I btw also notice that you are on Nginx. Have you read that FAQ section?

    Can you get it to work without page caching? (WebP Express neither requires WP Super Cache, Cache Enabler or any other page caching).

    I try CDN friendly and still not working 🙁

    Plugin Author rosell.dk

    (@roselldk)

    In 0.15.0 there are new “Self test” buttons. Perhaps clicking on these may provide the answer.

    Still not wokring.

    Testing “WebP Realizer” functionality
    UPLOADS
    Copying JPEG to uploads folder (webp-express-test-images/3tEUvh.JPEG). ok
    We now have a jpeg stored here:
    /home/thehinh/public_html/cdn/webp-express-test-images/3tEUvh.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)
    Notice that you are on Nginx and the rules that WebP Express stores in the .htaccess files probably does not have any effect.
    Please read the “I am on Nginx” section in the FAQ (https://wordpress.org/plugins/webp-express/)
    And did you remember to restart the nginx service after updating the configuration?
    PS: If you cannot get the redirect to work, you can simply rely on Alter HTML as described in the FAQ.
    Deleting test images

    THEMES
    Copying JPEG to themes folder (webp-express-test-images/frcEkN.JPEG). ok
    We now have a jpeg stored here:
    /home/thehinh/public_html/wp-content/themes/webp-express-test-images/frcEkN.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: http://www.thehinh.com/wp-content/webp-express/webp-images/doc-root/wp-content/themes/webp-express-test-images/frcEkN.JPEG.webp
    Response: 404 Not Found
    Response headers:
    – server: nginx
    – date: Wed, 18 Sep 2019 10:21:47 GMT
    – content-type: text/html; charset=UTF-8
    – x-powered-by: PHP/7.2.6
    – vary: Accept-Encoding, Cookie
    – set-cookie: bp_user-role=guest; expires=Fri, 27-May-2033 10:21:46 GMT; Max-Age=432000000; path=/
    – set-cookie: bp_user-registered=0; expires=Fri, 27-May-2033 10:21:46 GMT; Max-Age=432000000; path=/
    – expires: Wed, 11 Jan 1984 05:00:00 GMT
    – cache-control: no-cache, must-revalidate, max-age=0
    – link: <http://www.thehinh.com/wp-json/&gt;; rel=”https://api.w.org/&#8221;
    – content-encoding: gzip

    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)
    Notice that you are on Nginx and the rules that WebP Express stores in the .htaccess files probably does not have any effect.
    Please read the “I am on Nginx” section in the FAQ (https://wordpress.org/plugins/webp-express/)
    And did you remember to restart the nginx service after updating the configuration?
    PS: If you cannot get the redirect to work, you can simply rely on Alter HTML as described in the FAQ.
    Deleting test images

    Plugin Author rosell.dk

    (@roselldk)

    Well, it seems your Nginx rules aren’t working.
    You did set them up, right?
    And you have read the “I am on Nginx” section in the FAQ (https://wordpress.org/plugins/webp-express/), right?
    Did you remember to restart nginx?

    Hi @thehinhcom,

    If you are still facing this problem and using Cache Enabler, you should change WebP Express settings to Append “.webp”. Cache Enabler will not replace URLs otherwise because if you see the code, they check whether <original-image-path>.webp file exists or not before replacing URLs.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WebP images not being served’ is closed to new replies.