# Find entries with at least 1 image

How can I find entries with at least 1 image?

{% set category = craft.categories.group('storyCategories').slug(catSlug).first() %}

{% set params = {
section : 'stories',
order : 'postDate desc',
relatedTo: category,
limit : '4'
} %}
{% set stories = craft.entries(params).find() %}


I have this, but am not sure how to only get stories entries when the story has an image.

• Do you put your images in relationfields or do you upload them via redactor? The first is really easy – Robin Schambach Dec 6 '17 at 17:16
• The images are in as asset fields. I've just realised I can do this: {% set params = { section : 'stories', order : 'postDate desc', relatedTo: category, limit : '4', storyImage: ':notempty:' } %} Where "storyImage" is the field name of my image field. – codeandchips Dec 6 '17 at 17:22
• Yes indeed. Would you mind adding that as an official answer and mark it as solved for future reference? – Robin Schambach Dec 6 '17 at 17:23

{% set params = { section : 'stories', order : 'postDate desc', relatedTo: category, limit : '4', storyImage: ':notempty:' } %}