Answers.Body: <p>You can dynamically create and specify transform parameters from your templates to achieve what you're looking for.  See <a href="http://buildwithcraft.com/docs/image-transforms#defining-transforms-in-your-templates" rel="nofollow">here</a> for an example.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-20T00:40:06.060Z
Answers.Text: Thanks for this Brad. I've updated my question with what my final code ended up like after checking out that example.
Answers.UserDisplayName: Stephen
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-19T03:49:51.097Z
Answers.LastActivityDate: 2015-01-19T03:49:51.097Z
Answers.UserDisplayName: Brad Bell
Body: <p>How can I output a resized Assets image in a single entry template? I'm trying to do what I used to do all the time with CE Image in EE. I'm hoping that I don't have to create an image transform in the CP for every single piece of image resizing that I want to do as that would be very time consuming (compared to using the CE Image parameters for width and height in EE).</p>
  
  <p>Here's my current code:</p>
  
  <pre><code>{% for asset in entry.mainImage %}
    &lt;img src="{{ asset.url }}" alt="{{ asset.title }}" /&gt;
  {% endfor %}
  </code></pre>
  
  <p>And for EE users, here's what I'm trying to replicate from EE:</p>
  
  <pre><code>{cf_static_image}
    {exp:ce_img:single src="{url}" width="800" height="600" alt="{alt_text}"}
  {/cf_static_image}
  </code></pre>
  
  <p>Thanks for any help in advance.</p>
  
  <p>Update: Here's what my final code looked like after following the example in the link provided by Brad below:</p>
  
  <pre><code>{% set thumb = {
    mode: 'fit',
    width: 800,
    height: 600,
    quality: 80
  } %}
  
  {% for asset in entry.mainImage %}
    &lt;img src="{{ asset.getUrl(thumb) }}" alt="{{ asset.title }}" /&gt;
  {% endfor %}
  </code></pre>
  
Tags: <assets><image-transforms><image>
Title: How to output a resized Assets image in a template
ThreadText: # How to output a resized Assets image in a template
  
  (Asked by: username_0 on 2015-01-19)
  
  How can I output a resized Assets image in a single entry template? I'm trying to do what I used to do all the time with CE Image in EE. I'm hoping that I don't have to create an image transform in the CP for every single piece of image resizing that I want to do as that would be very time consuming (compared to using the CE Image parameters for width and height in EE).
  
  Here's my current code:
  
  ```
  {% for asset in entry.mainImage %}
    <img src="{{ asset.url }}" alt="{{ asset.title }}" />
  {% endfor %}
  
  ```
  
  And for EE users, here's what I'm trying to replicate from EE:
  
  ```
  {cf_static_image}
    {exp:ce_img:single src="{url}" width="800" height="600" alt="{alt_text}"}
  {/cf_static_image}
  
  ```
  
  Thanks for any help in advance.
  
  Update: Here's what my final code looked like after following the example in the link provided by username_1 below:
  
  ```
  {% set thumb = {
    mode: 'fit',
    width: 800,
    height: 600,
    quality: 80
  } %}
  
  {% for asset in entry.mainImage %}
    <img src="{{ asset.getUrl(thumb) }}" alt="{{ asset.title }}" />
  {% endfor %}
  
  ```
  
  **Tags:** assets, image-transforms, image
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-01-19. Score: 2 | Accepted answer
  
  You can dynamically create and specify transform parameters from your templates to achieve what you're looking for. See [here](http://buildwithcraft.com/docs/image-transforms#defining-transforms-in-your-templates) for an example.
  
  > **Comments:**
  > **username_0**: Thanks for this username_1. I've updated my question with what my final code ended up like after checking out that example.  
  
  ---
  
  