@nosilver4u Autoptimize hasn’t been set to inline any JS or optimize the JS on my site, although i do use it for CSS.
We did recently upgrade to the latest WordPress version with webp support.
Even after disabling Autoptimize and every other performance plugin on our testing site, the error still shows for us.
If i re-enable “JS-WebP-Rewriting” in the settings, the error disappears. However, i’d like to avoid additional JS on the frontend, as we use Cloudflare for full page caching, we can let the server handle that so i was just using the picture rewrite.
Maybe this class exists even when it’s disabled
// class-eio-lazy-load.php line 289
// If JS WebP isn't running, set ewww_webp_supported to false so we have something defined.
if ( ! class_exists( 'EIO_JS_Webp' ) ) {
$body_tags = $this->get_elements_from_html( $buffer, 'body' );
if ( $this->is_iterable( $body_tags ) && ! empty( $body_tags[0] ) && false !== strpos( $body_tags[0], '<body' ) ) {
$body_webp_script = '<script>var ewww_webp_supported=false;</script>';
// Add the WebP script right after the opening tag.
$buffer = str_replace( $body_tags[0], $body_tags[0] . "\n" . $body_webp_script, $buffer );
}
}