<p>Remove the single quotes around wideCrop.</p>

<pre><code>&lt;img class="full" src="{{ image.getUrl(wideCrop) }}"&gt; 
</code></pre>

<p><a href="https://craftcms.com/docs/image-transforms" rel="nofollow">Details for why the difference in "template defined" transforms here:</a></p>

CC BY-SA 3.0
2016-08-15T23:32:01.390Z
Thanks so much. I can't believe I missed the quote marks. Too much code, not enough sleep. :)
glider
CC BY-SA 3.0
2016-08-15T23:00:34.440Z
2016-08-15T23:06:11.177Z
2016-08-15T23:06:11.177Z
AbbeyDesign
<p>I've got a Matrix field with an image. If I use a pre-defined transform that's defined in Assets everything works fine. However, I need to set a transform manually in the template but it keeps returning an error "The transform “wideCrop” cannot be found!". I have used transforms in templates all over the site that work fine so I'm puzzled why this particular one isn't working. </p>

<p>This is from an embedded template inside the entry:</p>

<pre><code>{% for block in entry.contents %}
    {% for image in block.image %}          

        {% switch block.position %}
            {% case 'full' %}
                {% set wideCrop = { width: 940, height: 360, mode: 'fit' } %}
                &lt;img class="full" src="{{ image.getUrl('wideCrop') }}"&gt;   
        {% endswitch %}

    {% endfor %}
{% endfor %} 
</code></pre>

<p>Thanks in advance!</p>

<assets><image-transforms>
Transform cannot be found
# Transform cannot be found

(Asked by: username_0 on 2016-08-15)

I've got a Matrix field with an image. If I use a pre-defined transform that's defined in Assets everything works fine. However, I need to set a transform manually in the template but it keeps returning an error "The transform “wideCrop” cannot be found!". I have used transforms in templates all over the site that work fine so I'm puzzled why this particular one isn't working. 
This is from an embedded template inside the entry:
{% for block in entry.contents %}
    {% for image in block.image %}          

        {% switch block.position %}
            {% case 'full' %}
                {% set wideCrop = { width: 940, height: 360, mode: 'fit' } %}
                   
        {% endswitch %}

    {% endfor %}
{% endfor %} 

Thanks in advance!

**Tags:** assets, image-transforms

---

## 1 answers

### Answer by username_1 on 2016-08-15. Score: 4 | Accepted answer

Remove the single quotes around wideCrop.
 

Details for why the difference in "template defined" transforms here:

> **Comments:**
> **username_0**: Thanks so much. I can't believe I missed the quote marks. Too much code, not enough sleep. :)  

---

