Posted by Shane Bishop, on 23 Jun 2020
WooCommerce inserts product variation image URLs into a JSON object attached via the
data-product_variations attribute on
form.variations_form. It may be possible to alter the JSON via filter to include WebP URLs, and thus one could substitute them on the front-end with JS WebP.