<p>This was an error in the docs. You get the automatic format assignment by default, no need to explicitly set <code>format: 'auto'</code>.</p>

CC BY-SA 3.0
2016-03-14T21:25:30.097Z
2016-03-14T21:25:30.097Z
Brandon Kelly
<p>The docs state:</p>

<blockquote>
  <p>format can be set to 'jpg', 'gif', 'png', or 'Auto'.</p>
</blockquote>

<p>*Why is it 'Auto' not 'auto'?!</p>

<p><a href="https://craftcms.com/docs/image-transforms#possible-values" rel="nofollow">https://craftcms.com/docs/image-transforms#possible-values</a></p>

<p>I'm using a variable to define the transform settings:</p>

<pre><code>{% set small = {
    mode:       'fit',
    width:      800,
    height:     600,
    quality:    80,
    position:   'center-center',
    format:     'Auto'
} %}
</code></pre>

<p>But Craft errors with:</p>

<blockquote>
  <p>Imagine\Exception\InvalidArgumentException Saving image in "auto"
  format is not supported, please use one of the following extensions:
  "gif", "jpeg", "png", "wbmp", "xbm"</p>
</blockquote>

<p>Is this a bug or is my code incorrect?</p>

CC BY-SA 3.0
2016-03-14T17:58:54.360Z
Does this work without the 'format' parameter?
Are you using ImageMagik or GD?
Matt P
CC BY-SA 3.0
2016-03-15T13:34:27.113Z
Yes it works without, so I'm assuming it defaults to Auto. Must be GD as I've not installed ImageMagik.
Elliot Lewis
<image-transforms>
Image Transform in template 'Auto' errors
# Image Transform in template 'Auto' errors

(Asked by: username_0 on 2016-03-14)

The docs state:

format can be set to 'jpg', 'gif', 'png', or 'Auto'.

*Why is it 'Auto' not 'auto'?!
https://craftcms.com/docs/image-transforms#possible-values
I'm using a variable to define the transform settings:
{% set small = {
    mode:       'fit',
    width:      800,
    height:     600,
    quality:    80,
    position:   'center-center',
    format:     'Auto'
} %}

But Craft errors with:

Imagine\Exception\InvalidArgumentException Saving image in "auto"
  format is not supported, please use one of the following extensions:
  "gif", "jpeg", "png", "wbmp", "xbm"

Is this a bug or is my code incorrect?

**Tags:** image-transforms
> **Comments:**
> **username_1**: Does this work without the 'format' parameter? Are you using ImageMagik or GD?  
> **username_0**: Yes it works without, so I'm assuming it defaults to Auto. Must be GD as I've not installed ImageMagik.  

---

## 1 answers

### Answer by username_2 on 2016-03-14. Score: 3 | Accepted answer

This was an error in the docs. You get the automatic format assignment by default, no need to explicitly set `format: 'auto'`.


---

