Shopify / liquid

Liquid markup language. Safe, customer facing template language for flexible web apps.

Home Page:https://shopify.github.io/liquid/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to output file (image) alt form Files in Shopify

kwella opened this issue · comments

commented

Hello
Im looking for the possibility to output image_alt for the image uploaded into Files
I do have incremental loop to output custom images and everything works like a charm
I added text alt to the images in Files, but have to idea hot to display it as a text under the images
Images are there - please see come

{% for i in (1..51) %}
{% capture code_img %}{{ handle }}_{{ i }}.jpg{% endcapture %}
{% assign mod = forloop.index | modulo: 37 %}

{%- liquid
case mod
xxxxxx all my cases here within layout
endcase
%}

{{ code_img | file_url | img_tag }} ////////Thats where I need to output img_alt somehow as a variable something like {{ code_img.alt}}???
{% endfor %}