• Plugin Author Optimizing Matters

    (@optimizingmatters)


    Due to a recent technical change in Shortpixel’s AVIF toolchain, .png files with transparency will loose that transparency in browsers that support AVIF if “Load WebP or AVIF in supported browsers?” is on.

    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');

    If additional info becomes available I’ll follow up below.

    frank

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    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.

    Webleon

    (@webleonofficial)

    Hi Frank,

    Just to add to this. We have this problem on our website, but it is still there. If we enable the option of using avif/webp in autoptomize, we still get a green background on all transparant images in chrome. Do you maybe know more about this?

    For now we disabled the option on our websites.

    Thanks in advance!

    Kind regards/Met vriendelijke groet,

    Bram Verweij
    Webleon

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Guess the problem is the images were optimized before Shortpixel made the change not to convert png’s into avif’s and hence the optimized images are on the Shortpixel CDN already with the transparency issue.

    Easiest workaround is adding .png to the image optimization exclusions (and clearing your page cache).

    hope this helps,
    frank

    Webleon

    (@webleonofficial)

    Thanks Frank, we will try this!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image optimization: issue with transparent .png to avif’ is closed to new replies.