Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
How can we update or edit meta fields for each product for getting multiple images of each product from shopify?

How can we update or edit meta fields for each product for getting multiple images of each product from shopify ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If I understand your question you want to have multiple images per product and set in the metafields of the product which image corresponds to which feature of the product.

I would suggest the following, possibly using a web application or an app that removes any manual intervention:

  • You upload all the pictures of the product using Shopify API (or manually).
  • You create a metafield attribute with a json that contains the map the index of the picture that you upload.
  • In your .liquid file you access pictures with something like product.media[product.metafields.myshop.media_data['front_picture']]

To make an example, let's say you have a product with 4 front and 5 back pictures.

  • You upload all your pictures. Front pictures are first 4 and back are the last ones (this is just an example, they could be mixed).
  • You set your metafield as { "front" : [1,2,3,4],"back" : [5,6,7,8,9]} (NB they don't have to be consequent numbers)
  • In your frontend you can put
    {% for front_index in product.metafields.myshop.media_data.front %}
          <img src="{{ product.media[front_index]| img_url: 'original' }}"/>
    {% endfor %}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!