I had never tried woocommerce with my plugin, so I didn’t know what would happen. I did a test by installing on a woocommerce site, creating some products and then installing my plugin. The images were in jpeg format. I converted them to webp and everything was fine. However, mine is a limited test and I don’t know woocommerce well. I don’t know what if there are image galleries, I only tried the main product images.
However my plugin should work with woocommerce. I recommend you try it in a test environment first. And let me know if you decide to use it and whether it works for you or not.