Hi, I would like to use the product image Alt text to display a caption over the product image.
Here is the code I have in my product-images.liquid file
The product title is being displayed perfectly, but I can not seem to get the alt tag to display. I tried a number of other placeholder objects, with some working, and others not.
Can someone enlighten me on what I may be doing wrong? Am i missing something crucial to make this work?
I will post the full page code below…
Thanks for your help!!!
{%- assign featured_media = product.selected_or_first_available_variant.featured_media | default: product.featured_media -%}
{%- unless product.empty? -%}
{% assign first_3d_model = product.media | where: ‘media_type’, ‘model’ | first %}
{%- if first_3d_model -%}
<button
aria-label=“{{ ‘products.product.view_in_space_label’ | t }}”
class=“product-single__view-in-space”
data-shopify-xr
data-shopify-model3d-id=“{{ first_3d_model.id }}”
data-shopify-title=“{{ product.title }}”
data-shopify-xr-hidden
{{ ‘products.product.view_in_space’ | t }}
{%- endif -%}
{%- if product.media.size > 1 -%}
{%- for media in product.media -%}
{%- else -%}
{%- endunless -%}