Answers.Body: <p>You can use <code>relatedTo</code> for that:</p>
  
  <pre><code>{% set entries = craft.entries.section('mySection').relatedTo(myAsset) %}
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>{% set entries = craft.entries({ section: 'mySection', relatedTo: myAsset }) %}
  </code></pre>
  
  <p>Check out <a href="http://buildwithcraft.com/docs/relations#the-relatedTo-param" rel="nofollow">the documentation on relationships</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-11T19:37:59.967Z
Answers.Text: Thanks! Didn't realize that relatedTo would work without explicitly relating items.
Answers.UserDisplayName: jpea
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-11T21:23:59.783Z
Answers.Text: relatedTo is one of those magic ingredients that makes Craft look like something out of Harry Potter. :)
Answers.UserDisplayName: André Elvan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-11T19:08:50.673Z
Answers.LastActivityDate: 2014-09-11T19:08:50.673Z
Answers.UserDisplayName: André Elvan
Body: <p>Let's say that I have an Assets field on a single page where someone can add a bunch of images to a "gallery" on that page. Is there a way to perform a query and return the entries from a channel where these images are used as well?</p>
  
  <p>Ideally, I'm trying to get the URL's to all of the listing entries where any of these images are also used, but without the admin explicitly relating them to those entries on the single page. There's no explicit relationship between them, other than the same images were used on both the single and channel entry. </p>
  
Tags: <assets>
Title: Method for pulling entries that have a specific image linked?
ThreadText: # Method for pulling entries that have a specific image linked?
  
  (Asked by: username_0 on 2014-09-11)
  
  Let's say that I have an Assets field on a single page where someone can add a bunch of images to a "gallery" on that page. Is there a way to perform a query and return the entries from a channel where these images are used as well?
  
  Ideally, I'm trying to get the URL's to all of the listing entries where any of these images are also used, but without the admin explicitly relating them to those entries on the single page. There's no explicit relationship between them, other than the same images were used on both the single and channel entry.
  
  **Tags:** assets
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-09-11. Score: 2 | Accepted answer
  
  You can use `relatedTo` for that:
  
  ```
  {% set entries = craft.entries.section('mySection').relatedTo(myAsset) %}
  
  ```
  
  Or
  
  ```
  {% set entries = craft.entries({ section: 'mySection', relatedTo: myAsset }) %}
  
  ```
  
  Check out [the documentation on relationships](http://buildwithcraft.com/docs/relations#the-relatedTo-param).
  
  > **Comments:**
  > **username_0**: Thanks! Didn't realize that relatedTo would work without explicitly relating items.  
  > **username_1**: relatedTo is one of those magic ingredients that makes Craft look like something out of Harry Potter. :)  
  
  ---
  
  