Support » Plugin: Opti MozJpeg Guetzli WebP » WebP images not showing (in Dev Console)

  • Hi,
    managed to convert several images to .webp and added rewrite-rules to .htaccess.
    But no way images show up on frontend. See them in Media Library though.

    Image – /uploads/2018/01/espresso-13823698-768×461.jpg – shows as ContentType: image/jpeg, where /uploads/2018/01/espresso-13823698-768×461.jpg.webp is also available (but not served; in Chrome)

    What am I missing??

    I use Wp 5.1 / PHP7.2

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author ihorsl

    (@ihorsl)

    I encountered only these situations when webp duplicates were not severed:
    – site was using CloudFlare (images stuck in cache)
    – site was using both Apache and nginx. Apache for php and nginx for static files (images). In this case you will need to add url rewrite code to enginx config instead of .htaccess

    Hi,
    started all over again.
    Site uses Apache, no Cloudflare.
    Batch processing: OK Images are visible on server, but not in Media Library.
    Like laptop-3190194_1280-1-11661733-768×512.jpg (25,99 KB)
    and laptop-3190194_1280-1-11661733-768×512.jpg.webp (17,46 KB)

    Media Library only shows laptop-3190194_1280-1-11661733.jpg

    In Chrome Developer Tools this images is also shown.
    In my situation it’s always served from disk cache or memory cache???
    On TLD/dev/ no caching is activated. On TLD it is (W3TC).

    In .htaccess in TLD/dev/
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_URI} .*(jpe?g|png|gif)$
    RewriteCond %{REQUEST_FILENAME}\.webp -f
    RewriteRule (.*) %{REQUEST_FILENAME}\.webp [T=image/webp,E=accept:1]
    </IfModule>

    <IfModule mod_headers.c>
    Header append Vary Accept env=REDIRECT_accept
    </IfModule>

    AddType image/webp .webp

    Image visible in Chrome on:
    https://dev.mmwb.nl/wp-content/uploads/2019/02/laptop-3190194_1280-1-11661733-768×512.jpg.webp

    Hope you can help

    Kind regards.

    Hi,

    only works (now) with plugin Cache Enabler in Chrome Incognito after page refresh.

    Request URL: https://xxxxxxxx/wp-content/uploads/2019/02/laptop-3190194_1280-1-11661733-768×512.jpg.webp
    Request Method: GET
    Status Code: 200 OK
    Remote Address: xxxxxx:443
    Referrer Policy: no-referrer-when-downgrade
    Accept-Ranges: none
    Access-Control-Allow-Origin: *
    Cache-Control: max-age=31536000, public
    Connection: Keep-Alive
    Content-Encoding: gzip
    Content-Length: 17903
    Content-Type: image/webp

    Not in Chrome with cleared browser cache. Even after page refresh no show.

    Request URL: https://mmwb.nl/dev/wp-content/uploads/2019/02/laptop-3190194_1280-1-11661733-768×512.jpg
    Content-Length: 26612
    Content-Type: image/jpeg

    Plugin Author ihorsl

    (@ihorsl)

    Hi. The client should not see the webp url. But the content should be webp
    https://ihorsl.com/wp-content/uploads/2017/11/wpmjgu_brief_man_7-16804807.jpg

    Images are severed without redirect.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WebP images not showing (in Dev Console)’ is closed to new replies.