Answers.Body: <p>I've just realised I can do this: </p>
  
  <pre><code>{% set params = { section : 'stories', order : 'postDate desc', relatedTo: category, limit : '4', storyImage: ':notempty:' } %} 
  </code></pre>
  
  <p>Where "storyImage" is the field name of my image field</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-11T11:10:20.167Z
Answers.LastActivityDate: 2017-12-11T11:10:20.167Z
Answers.UserDisplayName: codeandchips
Body: <p>How can I find entries with at least 1 image?</p>
  
  <pre><code>{% 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() %}
  </code></pre>
  
  <p>I have this, but am not sure how to only get stories entries when the story has an image.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-06T17:16:51.273Z
Comments.Text: Do you put your images in relationfields or do you upload them via redactor? The first is really easy
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-06T17:22:11.127Z
Comments.Text: 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.
Comments.UserDisplayName: codeandchips
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-06T17:23:25.963Z
Comments.Text: Yes indeed. Would you mind adding that as an official answer and mark it as solved for future reference?
Comments.UserDisplayName: Robin Schambach
Tags: <entries><image>
Title: Find entries with at least 1 image
ThreadText: # Find entries with at least 1 image
  
  (Asked by: username_0 on 2017-12-06)
  
  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.
  
  **Tags:** entries, image
  
  > **Comments:**
  > **username_1**: Do you put your images in relationfields or do you upload them via redactor? The first is really easy  
  > **username_0**: 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.  
  > **username_1**: Yes indeed. Would you mind adding that as an official answer and mark it as solved for future reference?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-12-11. Score: 1 | Accepted answer
  
  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
  
  
  ---
  
  