Why I cannot retreive data from matafields list

I tried 3 ways, they will work when there’s only 1 image in the metafield; however, when the metafield has two images, nothing is returned.

Hi @oldchen666 ,

The payload returned for a list metafield is an array of image objects. Based on your screenshot, it seems like you’re trying to display an image as if you were working with a plain text value. And that’s not good. You may want to retrieve the data from the object, combine it with some HTML code, and then display the result on the product page. Please refer to this thread for a possible solution.

1 Like

I was testing and trying to get the link first, I have these codes for displaying images.

{% for s in product.metafields.custom.size_charts.value %}

{%endfor%}