在 Shopify 中,图像 ALT 标签(显示在主图像下方)在图像缩放上没有变化。
我正在为 Shopify 使用“供应”主题,这是product.liquid下的图像代码
<div class="grid-item large--eleven-twelfths text-center">
<div class="product-photo-container" id="productPhoto">
{% assign featured_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image %}
<img id="productPhotoImg" src="{{ featured_image | img_url: 'large' }}" alt="{{ featured_image.alt | escape }}" {% if settings.product_image_zoom_enable %} data-zoom="{{ featured_image | img_url: '1024x1024' }}"{% endif %}>
<span> {{ product.featured_image.alt | escape }} </span>
</div>
{% if product.images.size > 1 %}
<ul class="product-photo-thumbs grid-uniform" id="productThumbs">
{% for image in product.images %}
<li class="grid-item one-quarter">
<a href="{{ image.src | img_url: 'large' }}" class="product-photo-thumb">
<img src="{{ image.src | img_url: 'compact' }}" alt="{{ image.alt | escape }}">
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>