• ofmarconi

    (@ofmarconi)


    Hello!


    I don’t care about browsers that don’t support WEBP, so I just wanted to replace it and not interfere with any cache delivery.

    I just need to convert and replace PNG and JPG with WEBP ensuring smooth compatibility with CloudFlare and the edge cache.

    Is there such a possibility?

Viewing 1 replies (of 1 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Great question @ofmarconi.

    You can use the below to enable support for additional MIME types, such as PNG. This can be added to a custom functions plugin or a child themes functions.php file.

    function webp( $transforms ) {$transforms['image/png'] = array( 'image/png','image/webp');return $transforms;}add_filter( 'webp_uploads_upload_image_mime_transforms', 'webp' );

    We also have an open GitHub issue in relation to support fully within the plugin. See below:
    https://github.com/WordPress/performance/issues/371.

    Feel free to subscribe and follow along for future updates.

Viewing 1 replies (of 1 total)
  • The topic ‘Does it already support just converting to webp ignoring old browsers??’ is closed to new replies.