if “Load WebP or AVIF in supported browsers?” is on,
.png files with transparency will loose that transparency in browsers that support AVIF due to a recent technical change in Shortpixel’s AVIF toolchain.
Shortpixel is looking at alternative solutions, but until then as a workaround you can either:
.pngto Autoptimize’s lazyload exclusion field
- or to use below code snippet to disable AVIF images;
add_filter( 'autoptimize_filter_imgopt_do_avif', '__return_false');