I have a site where we need to display a random (portrait orientation) picture from the associated assets field into a galleries listing page, the image are all a consistent size, 600px wide but I can not work out how to filter based on the width variable.

I had this working when the site ran under craft

{% for image in stafflList.gallery.width('600').limit(1).order('RAND()') %}

and as the information is already in the system https://docs.statamic.com/variables/width I would value any help in how to get this set up.

Thank you in advance.

Answered by Richard Noakes! Go to answer.