Figuring out why my image is not working in the template Possibly a very easy question. Let me explain my flow:


I created an asset folder (images)
I added the folder in the assets
I created in image transforms 'square' which is an image of 500 by 500px. 
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?
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.