Skip to content

Commit

Permalink
Fix for issue magento#716. Wrong mimetype returned by magento image l…
Browse files Browse the repository at this point in the history
…ibrary
  • Loading branch information
flavien.chantelot committed Oct 28, 2014
1 parent 796e984 commit b900007
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b900007

Please sign in to comment.