AO image optimization: transparent .png to avif issue

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:

  • add .png to Autoptimize’s lazyload exclusion field
  • or to use below code snippet to disable AVIF images;

add_filter( 'autoptimize_filter_imgopt_do_avif', '__return_false');

1 thought on “AO image optimization: transparent .png to avif issue

  1. frank Post author

    Follow-up; Shortpixel has for now disabled png -> avif conversion (redirecting back to the original png-file) until a better, cross-browser solution for transparency can be found.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.