<p>As of version <code>2.5.2750</code> it appears Craft now comes with sample files to check against <code>isImageManipulatable()</code> in <code>/craft/app/helpers/ImageHelper.php</code> which includes the following files located at <code>/craft/app/resources/images/samples/</code> by default:</p>

<ul>
<li>sample.bmp</li>
<li>sample.gif</li>
<li>sample.jpeg</li>
<li>sample.jpg</li>
<li>sample.png</li>
<li>sample.svg</li>
<li>sample.tif</li>
<li>sample.tiff</li>
</ul>

<p>If the installed <a href="https://secure.php.net/manual/en/book.imagick.php" rel="nofollow noreferrer">Imagick</a> includes support for <code>tif</code> files it will be able to transform these without any extra configuration or hacking of the <code>isImageManipulatable()</code> function which was the only previous method of enabling transforms for <code>tif</code>. <a href="https://craftcms.stackexchange.com/a/10534/4118">Previous answer by @TomBauer</a>.</p>

<p>Note: It looks like you should be able to add support for extra files in Craft (if supported by installed Imagick) by providing a sample file in the above directory for Craft to check against. At least until Craft updates.</p>

CC BY-SA 3.0
2016-01-07T16:20:17.667Z
2017-02-23T15:50:38.650Z
2017-04-13T12:51:00.303Z
William Isted
<p>I found the way to create thumbnails of tif files. You have to change the function isImageManipulatable in the file /craft/app/helpers/ImageHelper.php:</p>

<pre><code>public static function isImageManipulatable($extension)
{
    $extensions = array('jpg', 'jpeg', 'gif', 'png', 'wbmp', 'xbm');

   if (craft()-&gt;images-&gt;isImagick())
    {
        $extensions[] = 'svg';
    }

    return in_array(mb_strtolower($extension), $extensions);

}
</code></pre>

<p>To this:</p>

<pre><code>public static function isImageManipulatable($extension)
{
    $extensions = array('jpg', 'jpeg', 'gif', 'png', 'wbmp', 'xbm');

   if (craft()-&gt;images-&gt;isImagick())
    {
        $extensions[] = 'svg';
        $extensions[] = 'tif';
    }

    return in_array(mb_strtolower($extension), $extensions);

}
</code></pre>

<p>I know, changing core code is not a real solution: i posted this change as a Craft feature request -> <a href="http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/8794456-better-support-of-image-types-in-image-transformat" rel="nofollow">http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/8794456-better-support-of-image-types-in-image-transformat</a></p>

CC BY-SA 3.0
2015-07-23T11:56:58.370Z
Whether or not tif is supported depends on Imagick configuration. TIFF also requires an external library (http://www.imagemagick.org/script/formats.php) so it most likely is not one of the formats supported by default on most hosts. Perhaps we'll add a config setting that would allow you to define additional extensions, but I can't give any guarantees.
Andris Sevcenko
CC BY-SA 3.0
2015-07-31T06:12:43.203Z
A config setting would be realy great! Thx for "check" this option.
Tom Bauer
CC BY-SA 3.0
2015-07-10T11:47:27.827Z
2015-07-10T11:47:27.827Z
Tom Bauer
<p>Currently, only <code>jpg</code>, <code>jpeg</code>, <code>gif</code>, <code>png</code>, <code>wbmp</code> and <code>xbm</code> files are supported for image transforms using <a href="https://secure.php.net/manual/en/book.imagick.php" rel="nofollow">Imagick</a> and <a href="https://secure.php.net/manual/en/book.image.php" rel="nofollow">GD</a>.  Additionally, if you have Imagick installed, Craft will also transform <code>svg</code> files.</p>

CC BY-SA 3.0
2015-07-10T11:49:18.437Z
Thank you for your explanation. I found now a way to create the thumbnails from tif files. See solution above.
Tom Bauer
CC BY-SA 3.0
2015-07-10T03:02:33.260Z
2015-07-10T03:02:33.260Z
Brad Bell
<p>I use craft transformations for resizing images. The transformation of jpg files works as exepted, but the transformation of a tif image does not work. Imagick is installed and in the backend it creats and shows thumbnails of the images. When i rename the image from .tif to .jpg it performs the transformation also. </p>

<p>The Twig code looks like this:</p>

<pre><code>&lt;img src="{{ entry.getUrl('preview') }}" width="200" height="200"&gt;
</code></pre>

<p>The output HTML Code of a tif image looks like this:</p>

<p><code>&lt;img src="http://www.am-sb-coop.ch/internal/img/AM_HC16_KW00_Broccoli_rl_ZTG_DL.tif" width="200" height="200"&gt;</code></p>

<p>The output HTML Code of a jpg image looks like this:
<code>&lt;img src="http://www.am-sb-coop.ch/internal/img/_preview/AM_FOOD_KW28_Prix_Gar_Konfi_mg_01_ZTG_DL.jpg" width="200" height="200"&gt;</code></p>

<p>Is this a bug or have i missed a config setting?</p>

<p>Here are some images for explanation:</p>

<p><img src="https://i.sstatic.net/mcRaO.jpg" alt="Output in Browser">
<img src="https://i.sstatic.net/UbCoa.jpg" alt="Backend shows Thumbnails">
<img src="https://i.sstatic.net/jZuC5.jpg" alt="Transformation settings"></p>

<image-transforms>
Image transformation of tif image does not work
# Image transformation of tif image does not work

(Asked by: username_0 on 2015-07-09)

I use craft transformations for resizing images. The transformation of jpg files works as exepted, but the transformation of a tif image does not work. Imagick is installed and in the backend it creats and shows thumbnails of the images. When i rename the image from .tif to .jpg it performs the transformation also. 
The Twig code looks like this:


The output HTML Code of a tif image looks like this:

The output HTML Code of a jpg image looks like this:

Is this a bug or have i missed a config setting?
Here are some images for explanation:

**Tags:** image-transforms

---

## 3 answers

### Answer by username_1 on 2016-01-07. Score: 3 | Accepted answer

As of version `2.5.2750` it appears Craft now comes with sample files to check against `isImageManipulatable()` in `/craft/app/helpers/ImageHelper.php` which includes the following files located at `/craft/app/resources/images/samples/` by default:

* sample.bmp
* sample.gif
* sample.jpeg
* sample.jpg
* sample.png
* sample.svg
* sample.tif
* sample.tiff

If the installed [Imagick](https://secure.php.net/manual/en/book.imagick.php) includes support for `tif` files it will be able to transform these without any extra configuration or hacking of the `isImageManipulatable()` function which was the only previous method of enabling transforms for `tif`. [Previous answer by @TomBauer](https://craftcms.stackexchange.com/a/10534/4118).

Note: It looks like you should be able to add support for extra files in Craft (if supported by installed Imagick) by providing a sample file in the above directory for Craft to check against. At least until Craft updates.


---

### Answer by username_0 on 2015-07-10. Score: 3

I found the way to create thumbnails of tif files. You have to change the function isImageManipulatable in the file /craft/app/helpers/ImageHelper.php:
public static function isImageManipulatable($extension)
{
    $extensions = array('jpg', 'jpeg', 'gif', 'png', 'wbmp', 'xbm');

   if (craft()->images->isImagick())
    {
        $extensions[] = 'svg';
    }

    return in_array(mb_strtolower($extension), $extensions);

}

To this:
public static function isImageManipulatable($extension)
{
    $extensions = array('jpg', 'jpeg', 'gif', 'png', 'wbmp', 'xbm');

   if (craft()->images->isImagick())
    {
        $extensions[] = 'svg';
        $extensions[] = 'tif';
    }

    return in_array(mb_strtolower($extension), $extensions);

}

I know, changing core code is not a real solution: i posted this change as a Craft feature request -> http://feedback.buildwithcraft.com/forums/285221-feature-requests/suggestions/8794456-better-support-of-image-types-in-image-transformat

> **Comments:**
> **username_2**: Whether or not tif is supported depends on Imagick configuration. TIFF also requires an external library (http://www.imagemagick.org/script/formats.php) so it most likely is not one of the formats supported by default on most hosts. Perhaps we'll add a config setting that would allow you to define additional extensions, but I can't give any guarantees.  
> **username_0**: A config setting would be realy great! Thx for "check" this option.  

---

### Answer by username_3 on 2015-07-10. Score: 1

Currently, only `jpg`, `jpeg`, `gif`, `png`, `wbmp` and `xbm` files are supported for image transforms using [Imagick](https://secure.php.net/manual/en/book.imagick.php) and [GD](https://secure.php.net/manual/en/book.image.php). Additionally, if you have Imagick installed, Craft will also transform `svg` files.

> **Comments:**
> **username_0**: Thank you for your explanation. I found now a way to create the thumbnails from tif files. See solution above.  

---

