Query for pages with images

I’m trying to add a pages field where the user should be able to select some “highlights” from a set of available pages. I want to limit the query to only show pages that have images. Is that possible?
I tried to query: site.find("projects").filterBy("hasImages", true), however this doesn’t work.

Did you try with children() like that?

query: site.find("projects").children().filterBy("hasImages", true)

oops. thank you!