Answers.Body: <p>I believe a Reference Tag can not perform an image transform because it doesn't return an ElementCriteriaModel object.</p>
  
  <p>I worked around this by using the craft asset id parameter:</p>
  
  <pre><code>    {% set assetSearch  = craft.assets.id(12651) %}
  
      {{assetSearch.first().getUrl('transform')}}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-13T14:56:57.950Z
Answers.Text: Great solution, thnx!
Answers.UserDisplayName: Coen van der Kolk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-12T22:39:50.927Z
Answers.LastActivityDate: 2016-10-13T15:25:43.253Z
Answers.LastEditDate: 2016-10-13T15:25:43.253Z
Answers.UserDisplayName: Rjoss
Answers.Body: <p>I think you are forgetting to loop through the images. If not could you be clearer in your question?</p>
  
  <p>It should work like this: </p>
  
  <pre><code>{% for image in entry.imageHandle %}
      &lt;img src="('{{ image.getUrl('transform') }}')" width="{{ image.getWidth('transform') }}" height="{{ image.getHeight('transform') }}');"&gt;
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-07T08:56:32.903Z
Answers.Text: Hi justin,
  
  I would like to use the reference tags. To do that I need to parse the var as explained in: [link](https://craftcms.com/docs/reference-tags)
  But as I don't just want the url back, I don't get how to parse the code to also do an image transfrom.
  Regards
Answers.UserDisplayName: Coen van der Kolk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-07T07:54:04.383Z
Answers.LastActivityDate: 2016-10-07T07:54:04.383Z
Answers.UserDisplayName: Justin Dekkers
Body: <p>Can someone tell me how to do an image transform on a reference tag? I've tried</p>
  
  <pre><code>{% set images %}
  &lt;img src="{asset:123:getUrl('transform')}" /&gt;
  &lt;img src="{asset:124:getUrl('transform')}" /&gt;
  {% endset %}
  
  {{ images|parseRefs|raw }}
  </code></pre>
  
  <p>But this just gives back the source urls and not the crops.</p>
  
  <p>Regards</p>
  
Tags: <image-transforms><reference-tags>
Title: image transform on reference tag
ThreadText: # image transform on reference tag
  
  (Asked by: username_0 on 2016-10-07)
  
  Can someone tell me how to do an image transform on a reference tag? I've tried
  
  ```
  {% set images %}
  <img src="{asset:123:getUrl('transform')}" />
  <img src="{asset:124:getUrl('transform')}" />
  {% endset %}
  
  {{ images|parseRefs|raw }}
  
  ```
  
  But this just gives back the source urls and not the crops.
  
  Regards
  
  **Tags:** image-transforms, reference-tags
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-10-12. Score: 3 | Accepted answer
  
  I believe a Reference Tag can not perform an image transform because it doesn't return an ElementCriteriaModel object.
  
  I worked around this by using the craft asset id parameter:
  
  ```
      {% set assetSearch  = craft.assets.id(12651) %}
  
      {{assetSearch.first().getUrl('transform')}}
  
  ```
  
  > **Comments:**
  > **username_0**: Great solution, thnx!  
  
  ---
  
  ### Answer by username_2 on 2016-10-07. Score: 1
  
  I think you are forgetting to loop through the images. If not could you be clearer in your question?
  
  It should work like this:
  
  ```
  {% for image in entry.imageHandle %}
      <img src="('{{ image.getUrl('transform') }}')" width="{{ image.getWidth('transform') }}" height="{{ image.getHeight('transform') }}');">
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_0**: Hi username_2,  I would like to use the reference tags. To do that I need to parse the var as explained in: [link](https://craftcms.com/docs/reference-tags) But as I don't just want the url back, I don't get how to parse the code to also do an image transfrom. Regards  
  
  ---
  
  