Support » Plugin: Cache Enabler - WordPress Cache » WebP images not being served

  • Resolved gubu2

    (@gubu2)


    I recently bulk optimized our website images and created .webp versions using Optimus. I then installed Cache Enabler and checked ‘Create an additional cached version for WebP image support’. However, the .webp versions are not being served through my browser (chrome on mac OS) – see https://www.alescoproperty.com.

    Any ideas?

    Thanks!

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Have you checked your site while logged out? Cache Enabler only delivers cached files to logged out users.

    I was too, I use Optimus plugin to compress jpg and png images and create webp but it not show webp images.

    • This reply was modified 1 year, 11 months ago by thehinhcom.

    Thanks, I’ve checked and the files are delivering when logged out.

    Hi, I am experiencing the same images with my website — lacolon.com. When I navigate to my website on Chrome Incognito, I do not see any webp files being downloaded.

    Here’s what I’ve done:

    – all plugins and theme have updated

    – CE is installed (see code <!-- Cache Enabler by KeyCDN @ 16.12.2018 11:56:47 (html) --> at bottom of source)

    – CE webp setting is enabled

    – confirmed .webp files exist (via SFTP). files created via Optimus.

    – Autoptimize plugin install and configured

    – cleared cache multiple times

    Any ideas? Would love to get this fixed.

    Do I need to code the <picture> element manually for all the images on my website?

    Thanks,
    Ben

    @zeadsdead I just checked one of your images however it looks like the WebP file either hasn’t been created or isn’t in the proper directory. For example, this image returns a 404: https://t1esl305pr43gk6bo33tf4wl-wpengine.netdna-ssl.com/wp-content/themes/la-colon/images/conditions_img.webp

    Thx for the immediate reply @codyarsenault

    To address your comment above, I do have WEBP files for _most_ assets on my site. See this page https://lacolon.com/our-doctors/gary-hoffman-md

    For example, this asset: https://t1esl305pr43gk6bo33tf4wl-wpengine.netdna-ssl.com/wp-content/uploads/2011/02/dr_gary_hoffman.jpg

    Is also available as WEBP: https://t1esl305pr43gk6bo33tf4wl-wpengine.netdna-ssl.com/wp-content/uploads/2011/02/dr_gary_hoffman.webp

    • This reply was modified 1 year, 10 months ago by ZeadsDead.

    I see this at the bottom of our HTML: <!-- Cache Enabler by KeyCDN @ 17.12.2018 14:22:41 (html) -->

    Unfortunately, I think CE causes a handful of my images on the homepage to no longer be loaded from our CDN. 🙁 . I need to investigate further.

    Onwards! See my links in previous comment… the WEBP version is available yet it’s not being loaded.

    Details:
    – Host & CDN: wpengine
    – Plugins (incomplete list): Autoptimize, Optimus, CE

    WPengine did mention there may be a conflict with their post processing scripts but I doubt that’s the problem?

    Any thoughts here?

    • This reply was modified 1 year, 10 months ago by ZeadsDead. Reason: clarification and brevity

    Hmm, this may actually be related to WPEngine. As mentioned in their disallowed plugins page, most caching plugins do not cooperate with their custom caching environment: https://wpengine.com/support/disallowed-plugins/

    Also, when trying to access the WebP version of the image you provided above (from your CDN) produces a 301 redirect to your origin server:

    curl -I https://t1esl305pr43gk6bo33tf4wl-wpengine.netdna-ssl.com/wp-content/uploads/2011/02/dr_gary_hoffman.webp
    HTTP/1.1 301 Moved Permanently
    Date: Tue, 18 Dec 2018 15:51:06 GMT
    Content-Type: text/html
    Content-Length: 178
    Connection: keep-alive
    Location: https://lacolon.com/wp-content/uploads/2011/02/dr_gary_hoffman.webp
    X-Type: default
    Server: NetDNA-cache/2.2
    X-Cache: MISS

    rats! you are correct @codyarsenault . I don’t think CE & wpengine play nice together.

    Unfortunately I have had to disable CE for now and start looking for alternative routes.

    Thanks!

    websitesforanything

    (@websitesforanything)

    Hi @zeadsdead

    Did you have any luck finding a solution? I’m in the same boat with WP Engine. We also use Cloudflare and/or Autoptimize for some sites.

    @websitesforanything i deleted CE, installed “EWWW Image Optimizer Cloud” and paid for them to crunch all my images and turn them into webp files (ie, filename.jpg ==> filename.jpg.webp… webp gets appended, not replaced).

    Then I hit up WPE support chat and they installed an NGINX rule to serve webp images to compatible browsers (chrome, firefox, and Edge). This isn’t the exact rule, but it’s something like this:

    `
    if ( $http_accept ~ “image/webp” ) {
    set $webp ‘.webp’ ;
    }
    location ~* \.(png|jpe?g|gif)$ {
    add_header Vary Accept;
    default_type image/webp;
    try_files $uri$webp $uri =404;
    }
    `

    I think this seemed to break things on Safari so for weeks after I had to continually check to ensure images were loading. I solved this by clearing the various cache’s in the WP Admin Dashboard as well as via the WPE Utilities tab. Images now seem to load just fine in Safari and all other browsers.

    So this worked fine but then I realized the images needed cache headers… so you’ll have to have WPE modify the rule to include the correct cache headers.

    Hope that helps!

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