Multiple image transforms of same image in template I'm getting odd results when trying to apply multiple image transforms to the same image. Here's my code:

{% for photo in photos %}
    {% set thumb = photo.image.first().setTransform({ mode: 'crop', width: 300, height: 300 }) %}
    {% set large = photo.image.first().setTransform({ width: 600 }) %}
    &lt;div&gt;
        &lt;a href="{{ large.url }}"&gt;&lt;img src="{{ thumb.url }}"&gt;&lt;/a&gt;
    &lt;/div&gt;
{% endfor %}


The above code renders an image that is 600px wide for BOTH "thumb" and "large" even though the criteria for each is different and I'm setting unique variables.

Is it possible to have multiple transforms on the same image? Is there another approach I should try?



EDIT

Same results with these two code variations:

{% set photos = craft.entries.section('photo').find() %}
{% set thumbTransform = { mode: 'crop', width: 300, height: 300 } %}
{% set largeTransform = { width: 600 } %}
{% for photo in photos %}
    {% set p = photo.image.first() %}
    {% set thumb = p.setTransform(thumbTransform) %}
    {% set large = p.setTransform(largeTransform) %}
    &lt;div&gt;
        &lt;a href="{{ large.url }}"&gt;&lt;img src="{{ thumb.url }}"&gt;&lt;/a&gt;
    &lt;/div&gt;
{% endfor %}


AND

{% set photos = craft.entries.section('photo').find() %}
{% for photo in photos %}
    {% set thumbImage = photo.image.first() %}
    {% set largeImage = photo.image.first() %}
    {% set thumb = thumbImage.setTransform({ mode: 'crop', position: 'center-center', width: 300, height: 300 }) %}
    {% set large = largeImage.setTransform({ width: 600 }) %}
    &lt;div&gt;
        &lt;a href="{{ large.url }}"&gt;&lt;img src="{{ thumb.url }}"&gt;&lt;/a&gt;
    &lt;/div&gt;
{% endfor %}
You might consider setting a variable for the image, then one for each transform type.

{% set thumb = { mode: 'crop', width: 300, height: 300 } %}
{% set large = { width: 600 } %}

{% for photo in photos %}
    {% set p = photo.image.first() %}
    &lt;div&gt;
        &lt;a href="{{ p.getUrl(large) }}"&gt;&lt;img src="{{ p.getUrl(thumb) }}"&gt;&lt;/a&gt;
    &lt;/div&gt;
{% endfor %}