I'm looking for methods to call two Theme.js functions, _productThumbSwitch and _productThumbnailSlider when the variant is changed. The variants per product of my store are many so I need to limit images shown on product page. I've managed to write some liquid codes and JS to filter images displayed by image alt when the product page is loaded initially or users change the variant. When the product page is loaded initially, it works fine and the product images' functions like zoom image work normally. But when the variant is changed, the thumbnail slider isn't shown and zoom image doesn't work anymore.
If anyone could help, it would be greatly appreciated. Thank you in advance.