• Resolved j_sagu

    (@j_sagu)


    Hey

    I am trying to install WebP but the logo hasn’t turned green. The coding has been inserted into the .htaccess file

    # BEGIN EWWWIO
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$
    RewriteCond %{REQUEST_FILENAME}.webp -f
    RewriteRule (.+)\.(jpe?g|png)$ %{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
    # END EWWWIO

    Not sure what I am suppose to do now?

    Thanks
    Jas

    https://ww.wp.xz.cn/plugins/ewww-image-optimizer/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter j_sagu

    (@j_sagu)

    I have noticed when optimising a regular image in media, there is a WebP resizing as well. Is this partially working even if the PNG box is still red?

    Plugin Author Shane Bishop

    (@nosilver4u)

    You will only see a green WebP image in Google Chrome (and Opera I think). If your server isn’t running Apache, then you need to use whatever rules are applicable to your web server software (just let me know what you’re using and I can point you in the right direction).

    Also, not that if you use a CDN, or a service like Cloudflare, or Sucuri’s CloudProxy, you cannot use the .htaccess method (or anything similar). The only method that is cache-compliant is the Alternative WebP Rewriting. There’s a video over on the installation page that talks about the differences and how to tell if it is working.

    Thread Starter j_sagu

    (@j_sagu)

    Hey

    Yeah I am using it on Chrome yet can’t see the green icon.

    I am using GoDaddy as the hosting provider…also not using CDN at the moment..

    Plugin Author Shane Bishop

    (@nosilver4u)

    Are you on managed WP with godaddy, or just standard shared hosting?
    And you’re not running WordPress multi-site are you?

    Thread Starter j_sagu

    (@j_sagu)

    Managed WP and only 1 site.

    Plugin Author Shane Bishop

    (@nosilver4u)

    I think their varnish cache might interfere with the .htaccess rules, but you might need to ask them about that. At any rate, to make sure all the pieces are in place, ask them if the server is running apache with mod_rewrite AND mod_headers enabled.

    If the answer is yet, then I suspect their custom caching prevents the .htaccess stuff from kicking in properly, and recommend you try out the Alt WebP option.

    Thread Starter j_sagu

    (@j_sagu)

    Okay I will ring them tomorrow morning regarding the mod_rewrite AND mod_headers.

    If they say yes, how do I try the Alt WebP option?

    Thanks

    Plugin Author Shane Bishop

    (@nosilver4u)

    It’s just a checkbox on the Convert tab. I would recommend you also remove the .htaccess rules from EWWW also at this point. It could cause some weird issues if the varnish caching is indeed doing something to interfere with the rewrites.

    Thread Starter j_sagu

    (@j_sagu)

    I just rang GoDaddy and they have confirm that mod_rewrite & mod_headers are enabled.

    Do i uncheck this box?

    WARNING: JPG to WebP conversion is lossy, but quality loss is minimal. PNG to WebP conversion is lossless.

    I have also removed the .htaccess rules from EWWW

    What shall I do now in regards to enabling webP on the website?

    Thanks
    Jas

    Plugin Author Shane Bishop

    (@nosilver4u)

    You’ll want the PNG/JPG to Webp option checked AND the Alt Rewriting option checked.

    Thread Starter j_sagu

    (@j_sagu)

    Okay, I have done this. I have also removed the EWWW coding from the .htaccess file.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘WebP not working…’ is closed to new replies.