Blog post metafield definition - file list order not accurate

Topic summary

Issue: A blog post metafield of type Files (list) did not preserve the reordered image sequence when rendered in Liquid. A simple for-loop over article.metafields.example.exhibition_hero_images.value produced an incorrect order. Screenshots and a code snippet were central to illustrating the mismatch.

Initial guidance: Changes might be delayed by Shopify’s system cache; waiting was suggested, but did not resolve the ordering.

Observation: A “Single line text (List)” metafield respected sort order, pointing to a problem specific to file-type lists. Local development via Shopify-CLI was noted but likely unrelated.

Resolution: Shopify replicated the issue, confirmed it was a bug, and deployed a fix. Liquid entries should now reflect the order set in metafield entries on Product/Blog pages.

Key terms:

  • Metafields: Custom fields in Shopify used to store structured data.
  • Liquid: Shopify’s templating language for rendering storefront content.
  • Shopify-CLI: Tool for local theme development.

Outcome & status: Fix applied; user should retest. Discussion appears resolved, pending confirmation.

Summarized with AI on February 13. AI used: gpt-5.

Hello, I’ve recently created a Blog post metafield definition to allow my content creator to add multiple image files to a blog post. You can upload files and display them just fine. The problem occurs when you want to re-arrange the images in a particular order.

I’ve attached some screen grabs of what my current config is along with my forloop. It’s pretty basic. I don’t think its a caching issue as I’ve cleared my cache and still. Same result.

{%- for image in article.metafields.example.exhibition_hero_images.value -%}
            
              
            

          {%- endfor -%}

Hi @Boba ,

It will take time to clear the system cache, not the site.

So you can test it in a few minutes or the next day it will work fine and this is managed by Shopify, you cannot clear cache or speed up the process.

Hope it helps!

Hi @LitExtension

Thank you for your response. I thought that very same thing but I’m still getting the images in an incorrect order. I don’t think this should make a difference but I’m developing locally using the Shopify-CLI.

I did on the other hand create a “Single line text (List)” field that does seem to respect the sort order of the list. Maybe it’s something with lists of files?

Hello Boba,

Thanks for reporting the issue. We were able to replicate your issue and determined it was a bug in our system.

We just added a fix for it and the entries in liquid now should reflect the order from the metafields entries on the specific Product/Blog page.

1 Like