Wordpress LScache Plugin: woocommerce gallery not working with litespeed cache~ how to exclude?
Last Updated on: Wed, 15 Apr 2026 00:00:02 Great plugin. Im currently having trouble with the compatibility of my WooCommerce gallery on variable single products. For some reason when I select the variation the first thumbnail changes to the variation image, and not the central image as you would expect. Based on this behaviour I suspect its a JS issue or conflict. If you know how to solve this issue Im all ears. Im open to excluding the gallery from optimisation if so let me know the simplest way how. Ive worked through all the current settings in the Litespeed plugin and nothing other than completely switching LiteSpeed off solves the conflict. The page I need help with: https://crossfire.com.au/ Hi, Could you please provide the report number ? You can get it from toolbox ?> report ?> click send to LiteSpeed Best regards, Hi, Could you please provide the report number ? You can get it from Toolbox ?> Report , click send to LiteSpeed Best regards, Report number: ZTVKXEEO Report date: 07/22/2020 02:28:42 Hi, Could you please try turn off JS combine , JS minify , and inline JS minify , purge all , and see how it goes ? Best regards, The issue still occurred after disabling js min. This issue does not occur on edge. Only on Chrome (even after browser history clear). I get the following JS error (on chrome console) on both logged-in and non-logged-in pages: Uncaught TypeError: Cannot read property style of null at HTMLDocument. ((index):1985) at j (jquery.min.js:2) at k (jquery.min.js:2) jquery.min.js:2 Uncaught TypeError: Cannot read property style of null at HTMLDocument. ((index):2005) at j (jquery.min.js:2) at k (jquery.min.js:2) Perhaps that is the issue? Thanks. direct. Hi, Could you please try export your current setting , then reset to default setting , and see if it works ? Best regards, Hi, Im going to mark this topic Resolved , due to lack of activity. If you still need help, please feel free to re-open it. Best regards, Hi, its still not resolved. All Id like to do is exclude the gallery from being optimised via litespeed. Are you able to tell me if that is this possible, please? I think Ive isolated the issue. There appears to be additional data passing to the .woocommerce-product-gallery__image.flex-active-slide only when LiteSpeed is activated, for some reason. There is an additional attribute being generated data-o_data-thumb=https://mydomain.com.au/the-main-feature-image.jpg which should not be there. How can I stop this from being generated? Again, are you able to tell me if I can exclude the .woocommerce-product-gallery from being optimised by LiteSpeed, please? solved Okay, I seem to have solved the issue. It was being caused by the WebP Attribute To Replace field in Image Optimisation Settings. Removing div.data-thumb solves the issue. The gallery now functions as you would expect. I can still run WebP Image optimisation via LiteSpeed. At least for me, I only needed to exclude div.data-thumb from being replaced by the WebP version (for whatever reason it was replacing the data with that belonging to another image). Hopefully, other people that have a similar issue find this solution works for them too . This is still happening. I too like @kierandmi have had to remove div.data-thumb from the replace with webp to fix it. Perhaps it would be good to look at whats causing this to stop other people being caught out. Dan
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference