I contact you because since I uploaded the legenda theme the lazy load provided by SG Optimizer (very common performance tool provided by SiteGround) has been broken. I have been in contact with SG and they performed a deep analysis.
They reported that the issue comes from the Legenda theme: it overwrites the default WooCommerce template in woocommerce/templates/cart/cart.php which overwirtes the default one of the plugin. It uses wp_kses_post( $thumbnail ) which clears all the HTML we place which breaks the lazy loading functionality.
I cannot afford to run the Legenda theme with no lazy load. Could you please help me to solve the issue? why the cart.php is overwrote? could you please find a way to use a method that avoids to clear the HTML generated by lazy load?
Thank you very much for your support. The code worked properly and the lazy load problem is now fixed.
I am wondering, with the intention of not loosing this change in the future, are you planning to implement this change in the next Legenda release or on the contrary you advise me to copy the provided file into the Legenda child?
Thanks for your help.