Answers.Body: <p>You can have more than one Asset in any Assets field, so it always returns to you an <em>array</em> of assets. So you just need:</p>
  
  <pre><code>{{ entry.hoofdafbeelding.first().getUrl('square') }}
  </code></pre>
  
  <p>...assuming you want the first asset.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-31T06:27:40.373Z
Answers.Text: Got it, this works indeed. Should something as rudimentary as this not be explicitly explained in the docs?
Answers.UserDisplayName: Warre Buysse
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-30T20:04:46.470Z
Answers.LastActivityDate: 2017-03-30T20:04:46.470Z
Answers.UserDisplayName: andrew.welch
Body: <p>Possibly a very easy question. Let me explain my flow:</p>
  
  <ol>
  <li>I created an asset folder (images)</li>
  <li>I added the folder in the assets</li>
  <li>I created in image transforms 'square' which is an image of 500 by 500px. </li>
  <li>I added a custom field to my homepage called 'hoofdafbeelding' and added an image to it.</li>
  </ol>
  
  <p>I call the image like so:</p>
  
  <p><code>{{ entry.hoofdafbeelding.getUrl('square') }}
  </code></p>
  
  <p>I get the following error:</p>
  
  <p><code>Object of class Craft\ElementCriteriaModel could not be converted to string
  </code></p>
  
  <p>What am I missing?! How can it be so hard to show an image?</p>
  
Tags: <assets><elementcriteriamodel>
Title: Figuring out why my image is not working in the template
ThreadText: # Figuring out why my image is not working in the template
  
  (Asked by: username_0 on 2017-03-30)
  
  Possibly a very easy question. Let me explain my flow:
  
  1. I created an asset folder (images)
  2. I added the folder in the assets
  3. I created in image transforms 'square' which is an image of 500 by 500px.
  4. I added a custom field to my homepage called 'hoofdafbeelding' and added an image to it.
  
  I call the image like so:
  
  `{{ entry.hoofdafbeelding.getUrl('square') }}`
  
  I get the following error:
  
  `Object of class Craft\ElementCriteriaModel could not be converted to string`
  
  What am I missing?! How can it be so hard to show an image?
  
  **Tags:** assets, elementcriteriamodel
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-30. Score: 4 | Accepted answer
  
  You can have more than one Asset in any Assets field, so it always returns to you an *array* of assets. So you just need:
  
  ```
  {{ entry.hoofdafbeelding.first().getUrl('square') }}
  
  ```
  
  ...assuming you want the first asset.
  
  > **Comments:**
  > **username_0**: Got it, this works indeed. Should something as rudimentary as this not be explicitly explained in the docs?  
  
  ---
  
  