get the variant image in Shopify

Add the following code in your liquid file:

{% if product.options contains 'Color' %}
    <ul class="variantimage-on">
       {% for image in product.images %}
           {% for variant in image.variants %}
               <li><img src="{{variant.image.src | img_url: 'large'}}"
                        alt="{{variant.title}}"/></li>
           {% endfor %}
       {% endfor %}
    </ul>
{% else %}
    //your else condition goes here
{% endif %}

get the variant image in Shopifyexpoundsofttechsolution

get the variant image in Shopify