Shopify / liquid

Liquid markup language. Safe, customer facing template language for flexible web apps.
https://shopify.github.io/liquid/
MIT License
11.05k stars 1.38k forks source link

Can not use where filter on images #1756

Open stijns96 opened 10 months ago

stijns96 commented 10 months ago

Since the image objects automatically outputs the handle by default, it's impossible to use the where filter on it.

{%- assign image = product.images | where: 'id', 123 -%}

This will result in storing the handle as a string in my assign, instead of storing it as an object.

I actually want to have the image object as an object by default and not as handle. Or we could do something like image.object for example.