From b900007f8fa92f71c705791097656eb3c08f83c2 Mon Sep 17 00:00:00 2001 From: "flavien.chantelot" Date: Tue, 28 Oct 2014 18:22:41 +0100 Subject: [PATCH] Fix for issue #716. Wrong mimetype returned by magento image library --- .../Magento/Framework/Image/Adapter/AbstractAdapter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php index 2a7407a8dc5b8..41e9a24aa3eff 100644 --- a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php +++ b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php @@ -291,12 +291,12 @@ public function __construct(\Magento\Framework\Filesystem $filesystem, array $da * Assign image width, height, fileType and fileMimeType to object properties * using getimagesize function * - * @return int|null + * @return string */ public function getMimeType() { - if ($this->_fileType) { - return $this->_fileType; + if ($this->_fileMimeType) { + return $this->_fileMimeType; } else { list($this->_imageSrcWidth, $this->_imageSrcHeight, $this->_fileType, ) = getimagesize($this->_fileName); $this->_fileMimeType = image_type_to_mime_type($this->_fileType);