Ecommerce Shopify WordPress Discussion

in shopify display variant image on variant picker button

I have seen a few solutions but nothing that i can use. i have a shopify store using Dawn. product variants names are not user friendly and i do not want to change the variant names. i want to show the variant image which i know exists. i think i need a way to reference the variant image. if there is another way to do this I happily appreciate other options. below is my code. i tried several references for product. products_variant. or variant. but i cannot seem to get the background url to look up the variant image. any help is appreciated. thanks {% comment %} variant_image_button_v1 {% endcomment %} {% if option.name == "Color" %} <label style="background-image:url({{ 'image_url' | url: '200x' }})" for="{{ section.id }}-{{ option.position }}-{{ forloop.index0 }}"> <span class="visually-hidden">{{ 'products.product.variant_sold_out_or_unavailable' | t }}</span> </label> {% else %} <label for="{{ section.id }}-{{ option.position }}-{{ forloop.index0 }}"> {{ value -}} <span class="visually-hidden">{{ 'products.product.variant_sold_out_or_unavailable' | t }}</span> </label> {% endif %}
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.