• Resolved Rhand

    (@rhand)


    When we decided to use WebP on the frontend will non webP images still be loaded for browsers that do not support WebP? We do not want to have issues in Safari for example.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Rhand

    (@rhand)

    I saw

    
    # BEGIN Imagify: rewrite rules for webp
    <IfModule mod_setenvif.c>
    	# Vary: Accept for all the requests to jpeg, png, and gif.
    	SetEnvIf Request_URI "\.(jpg|jpeg|jpe|png|gif)$" REQUEST_image
    </IfModule>
    
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteBase /
    
    	# Check if browser supports WebP images.
    	RewriteCond %{HTTP_ACCEPT} image/webp
    
    	# Check if WebP replacement image exists.
    	RewriteCond %{REQUEST_FILENAME}.webp -f
    
    	# Serve WebP image instead.
    	RewriteRule (.+)\.(jpg|jpeg|jpe|png|gif)$ $1.$2.webp [T=image/webp,NC]
    </IfModule>
    
    <IfModule mod_headers.c>
    	Header append Vary Accept env=REQUEST_image
    </IfModule>
    # END Imagify: rewrite rules for webp
    
    # BEGIN Imagify: webp file type
    <IfModule mod_mime.c>
    	AddType image/webp .webp
    </IfModule>
    # END Imagify: webp file type
    
    

    so it does check.

    Only somehow I do still not see WebP images loading the website in Chrome. Not sure why yet. Did a hard reload already and we did have WebP checked. Perhaps because we added it after we added the images they were not generated in WebP? I did do bulk optimize and that did work. But how do I get the WebP images now?

    • This reply was modified 4 years, 5 months ago by Rhand.
    Thread Starter Rhand

    (@rhand)

    When I do check the hero image that is still loaded as jpeg in media manager I have the option to remove the webP images. So why does WebP not load? I chose .htaccess option because I use Oxygen Builder and not really a theme. But then .htaccess rules should work no?

    • This reply was modified 4 years, 5 months ago by Rhand.
    • This reply was modified 4 years, 5 months ago by Rhand.
    Thread Starter Rhand

    (@rhand)

    I checked and all WebP images are there in the uploads folder. Also the one for the frontpage hero image. So somehow they do not load yet. I also have no cache running and the .htaccess rules are there as I checked.

    Thread Starter Rhand

    (@rhand)

    Perhaps CSS Background images are not affected by the .htaccess rules. Perhaps that is the issue. However, product images that are regular image tags are also not loading the WebP format. See https://staging.workcycles.com/product/workcycles-fr8/ for example.

    Thread Starter Rhand

    (@rhand)

    With W3 Total Cache now on WebP seems to start working. So perhaps that is because html is static now and .htaccess rules can do its job. Not sure why yet.

    Plugin Author WP Media

    (@wp_media)

    Hi @rhand

    For browsers that do not support WebP automatically, like Safari, Imagify will deliver images in the original format, so there is nothing further to be done.

    Checking your website we cannot see WebP delivered to the front side.

    Can you clear all your caches and check again if it is working?

    Also, check if you are using Cloudflare, CDN, or any other server cache and let us know as these will block WebP display.

    Best regards
    Ioanna

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Non WebP when not supported’ is closed to new replies.