Answers.Body: <p>Do you not still have to do:</p>
  
  <pre><code>        {% for asset in thumbnailImage %}
              &lt;img src="{{ asset.getUrl(imageTransform) }}" alt="" class="post__preview-img post__preview-img--grid"&gt;
          {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T14:17:16.210Z
Answers.Text: No need for a loop, because they've already got it narrowed down to the `first` thumbnail image. Also `.getUrl` and `.url` are interchangeable (`url` is just an alias).
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T06:58:43.480Z
Answers.LastActivityDate: 2016-04-18T06:58:43.480Z
Answers.UserDisplayName: John
Answers.Body: <p>The <code>imageTransform</code> value is actually an object, representing the entire dropdown field.</p>
  
  <p>Update the first line to this...</p>
  
  <pre><code>{% set imageTransform = storyEntry.storyThumbnailTransform.value %}
  </code></pre>
  
  <p>This will ensure that the selected <strong>value</strong> is passed on, instead of the full object.</p>
  
  <p>(The reason that you see the proper value when you output it directly is because the object's <code>__toString</code> method is automatically being called internally.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-16T17:48:29.710Z
Answers.Text: Lindsey, could this be used for custom image transforms set on the page? I'm getting the error that says that image transform is not available (and it is available if I type in verbatim).
Answers.UserDisplayName: John Johnson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-16T17:50:10.753Z
Answers.Text: @JohnJohnson Hard to say without looking at your code. I'd recommend [asking a brand new question](https://craftcms.stackexchange.com/questions/ask)... feel free to link back to this thread if relevant.
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-16T18:01:13.700Z
Answers.Text: @LindseyD here is the question: https://craftcms.stackexchange.com/questions/20873/user-selected-image-transform
Answers.UserDisplayName: John Johnson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-18T05:38:11.853Z
Answers.LastActivityDate: 2016-04-18T05:38:11.853Z
Answers.UserDisplayName: Lindsey D
Body: <p>I've created a section with a thumbnail image and also a dropdown to allow the user to select the transformation to apply to that image.</p>
  
  <p>I've pre-created all the asset transformations ready and this is the code I have :</p>
  
  <pre><code>{% set imageTransform = storyEntry.storyThumbnailTransform %}
  {% set thumbnailImage = storyEntry.storyThumbnail.first() %}
  &lt;img src="{{thumbnailImage.url(imageTransform) }}" alt="" class="post__preview-img post__preview-img--grid"&gt;
  </code></pre>
  
  <p>However, it doesn't appear to be rendering the image. If I output <code>storyEntry.storyThumbnailTransform</code> to the page, it displays the value of the image transform as expected.</p>
  
  <p>What am I doing wrong? Or is there another way to accomplish this?</p>
  
Tags: <assets><image>
Title: Using Image Transform as another custom field
ThreadText: # Using Image Transform as another custom field
  
  (Asked by: username_0 on 2016-04-17)
  
  I've created a section with a thumbnail image and also a dropdown to allow the user to select the transformation to apply to that image.
  
  I've pre-created all the asset transformations ready and this is the code I have :
  
  ```
  {% set imageTransform = storyEntry.storyThumbnailTransform %}
  {% set thumbnailImage = storyEntry.storyThumbnail.first() %}
  <img src="{{thumbnailImage.url(imageTransform) }}" alt="" class="post__preview-img post__preview-img--grid">
  
  ```
  
  However, it doesn't appear to be rendering the image. If I output `storyEntry.storyThumbnailTransform` to the page, it displays the value of the image transform as expected.
  
  What am I doing wrong? Or is there another way to accomplish this?
  
  **Tags:** assets, image
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-04-18. Score: 8 | Accepted answer
  
  The `imageTransform` value is actually an object, representing the entire dropdown field.
  
  Update the first line to this...
  
  ```
  {% set imageTransform = storyEntry.storyThumbnailTransform.value %}
  
  ```
  
  This will ensure that the selected **value** is passed on, instead of the full object.
  
  (The reason that you see the proper value when you output it directly is because the object's `__toString` method is automatically being called internally.)
  
  > **Comments:**
  > **username_3**: username_2, could this be used for custom image transforms set on the page? I'm getting the error that says that image transform is not available (and it is available if I type in verbatim).  
  > **username_2**: @username_3 Hard to say without looking at your code. I'd recommend [asking a brand new question](https://craftcms.stackexchange.com/questions/ask)... feel free to link back to this thread if relevant.  
  > **username_3**: @username_2 here is the question: https://craftcms.stackexchange.com/questions/20873/user-selected-image-transform  
  
  ---
  
  ### Answer by username_1 on 2016-04-18. Score: 0
  
  Do you not still have to do:
  
  ```
          {% for asset in thumbnailImage %}
              <img src="{{ asset.getUrl(imageTransform) }}" alt="" class="post__preview-img post__preview-img--grid">
          {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_2**: No need for a loop, because they've already got it narrowed down to the `first` thumbnail image. Also `.getUrl` and `.url` are interchangeable (`url` is just an alias).  
  
  ---
  
  