I read this helpful answer on How to query records that have an ActiveStorage attachment?
I am trying to query for all Users who have at least one image (easy to adapt related question, see below), and whose first image is .variable?
What I know so far
This returns all users who have at least one image
User.
left_joins(:images_attachments).
group(:id).
having("COUNT(active_storage_attachments) > 0")
But I'm not sure how to return just the users whose first image is .variable?
(i.e. users whose image won't error when its size is changed)