Change product image with multiple variant

Topic summary

Issue: In the Impact theme, the product image only updates for one variant option (either color or size), not when both are selected together.

Goal: Enable the product image to change based on a combination of variants (e.g., color + size), reflecting the correct image for the selected variant combination.

Context: The poster attached their code and is seeking guidance on how to modify it to support multi-variant image switching (mapping images to variant combinations).

Status: No solution or replies yet; the request remains open for troubleshooting help.

Summarized with AI on January 2. AI used: gpt-5.

Right now I am using Impact theme and I want to change my product image on multiple variants like color and size right working for only one size or color I want work for both variants and change product image . I have attched my code file Please help me .