Hello all,
I am using the code below to display file image in swatches
{% assign background_style = “url(” | append: variant.image | append: “)” %}
The path I get is
url(files/silver-clover-stainless-steel-0.jpg) and the path I need to display image is
url( //cdn.shopify.com/s/files/1/0770/9622/3003/files/silver-clover-stainless-steel-0.jpg )
I have tried using asset_url and img_url filter and it does not give the above path. Any guidance would be helpful.
{% assign background_style = “url(” | append: variant.image | append: “)” | asset_url %}
{% assign background_style = “url(” | append: variant.image | append: “)” | img_url %}
{% assign background_style = “url(” | append: variant.image | append: “)” | img_url: ‘’ %}
Thanks.
