Why doesn't the color swatch update if I change the file?

We cache color swatch files so they load faster since they won't change often. The trade off is that if you decide to change the swatch it won't be updated right away.

To force your swatches to update to the new image you've uploaded, you'll need to jump into the code briefly.

First, open up your theme code editor by navigating to /admin/themes, clicking Actions on your copy of your theme, and then Edit code.

Open these two files:

  • snippets/product-grid-item.liquid
  • snippets/variant-button.liquid

You'll need to remove some code that needs to be done carefully, so it's best you back up the file first. If something goes wrong you can always follow these steps to revert the file.

Search and delete | split: '?' | first and you're all set.

In both files the code should now look like this:

{%- assign color_image = value | handle | append: '.' | append: swatch_file_extension | asset_img_url: '50x' | prepend: 'https:' -%}

Motion support Impulse support Streamline support