Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Good morning,
I am trying to edit my product feeds code to display the last image in a products gallery rather than the first and was wondering whether this is possible?
I came across the following post, however, when I tried to apply the .last filter to the end of the image source it didn't appear to work for me.
https://stackoverflow.com/questions/27322846/query-last-image-in-shopify-liquid
Below is the product image snippet that I need to edit to pull in the last product gallery image.
<img class="lazyload {{ image_class }}" data-src="{{ img_url }}" data-widths="[{{ image_widths }}]" data-aspectratio="{{ image.aspect_ratio }}" data-sizes="auto" alt="{{ alt | default: image.alt | escape }}" {{ image_attributes }} data-image>
I'd appreciate and help and guidance on this 😊
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025