diff --git a/snippets/product-media-gallery.liquid b/snippets/product-media-gallery.liquid
index 35b9376..4912abd 100644
--- a/snippets/product-media-gallery.liquid
+++ b/snippets/product-media-gallery.liquid
@@ -217,93 +217,57 @@
calc((100vw - 8rem) / 3)
{%- endcapture -%}
{%- for media in product.media -%}
- {%- unless media.id == product.selected_or_first_available_variant.featured_media.id -%}
- {%- liquid
- capture media_index
- if media.media_type == 'model'
- increment model_index
- elsif media.media_type == 'video' or media.media_type == 'external_video'
- increment video_index
- elsif media.media_type == 'image'
- increment image_index
- endif
- endcapture
- assign media_index = media_index | plus: 1
- -%}
-
-
- {%- if media.media_type == 'model' -%}
-
- {%- render 'icon-3d-model' -%}
-
- {%- elsif media.media_type == 'video' or media.media_type == 'external_video' -%}
-
- {%- render 'icon-play' -%}
-
- {%- endif -%}
- {%- capture thumbnail_id -%}
- Thumbnail-{{ section.id }}-{{ forloop.index }}{{ id_append }}
- {%- endcapture -%}
-
-
- {%- endunless -%}
- {%- endfor -%}
- {%- if featured_media != null -%}
{%- liquid
capture media_index
- if featured_media.media_type == 'model'
+ if media.media_type == 'model'
increment model_index
- elsif featured_media.media_type == 'video' or featured_media.media_type == 'external_video'
+ elsif media.media_type == 'video' or media.media_type == 'external_video'
increment video_index
- elsif featured_media.media_type == 'image'
+ elsif media.media_type == 'image'
increment image_index
endif
endcapture
assign media_index = media_index | plus: 1
-%}
+ {% if product.selected_or_first_available_variant.featured_image.alt != media.alt and product.selected_or_first_available_variant.featured_image.alt != blank %}
+ style="display: none;"
+ {% endif %}
+ thumbnail-alt={{ media.alt }}
+ id="Slide-Thumbnails-{{ section.id }}-{{ forloop.index }}{{ id_append }}"
+ class="thumbnail-list__item slider__slide{% if section.settings.hide_variants and variant_images contains media.src %} thumbnail-list_item--variant{% endif %}"
+ data-target="{{ section.id }}-{{ media.id }}"
+ {% if media.media_type == 'video' or media.media_type == 'external_video' %}
+ data-is-video-type="true"
+ {% endif %}
+ data-media-position="{{ media_index }}">
+
+ {%- if media.media_type == 'model' -%}
+
+ {%- render 'icon-3d-model' -%}
+
+ {%- elsif media.media_type == 'video' or media.media_type == 'external_video' -%}
+
+ {%- render 'icon-play' -%}
+
+ {%- endif -%}
{%- capture thumbnail_id -%}
- Thumbnail-{{ section.id }}-0{{ id_append }}
- {%- endcapture -%}
+ Thumbnail-{{ section.id }}-{{ forloop.index }}{{ id_append }}
+ {%- endcapture -%}
- {%- endif -%}
+ {%- endfor -%}