Images.php
authorAlan Knowles <alan@roojs.com>
Thu, 21 Feb 2013 11:39:18 +0000 (19:39 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 Feb 2013 11:39:18 +0000 (19:39 +0800)
Images.php

index 3e2680f..48cd3da 100644 (file)
@@ -240,7 +240,10 @@ class Pman_Core_Images extends Pman
         
         if (!file_exists($fn)) {
             $fn = $img->getStoreName()  . '.'. $this->size . '.'. $img->fileExt();
-            $this->as_mimetype = $img->mimetype;
+            // if it's an image, convert into the same type for thumnail..
+            if (preg_match('#^image/#', $img->mimetype)) {
+               $this->as_mimetype = $img->mimetype;
+            }
         }
         
         if (!file_exists($fn)) {