diff --git a/File.php b/File.php index daa5d55..04a3cfa 100644 --- a/File.php +++ b/File.php @@ -178,7 +178,7 @@ class File extends \yii\db\ActiveRecord $this->ext = $this->file->extension; $this->md5 = md5_file($this->file->tempName); $patch = $this->getDir(true); - if ($this->isImage) + if ($this->isImage && $this->ext != 'jpg') //не конвертируем изображение в jpg если оно уже jpg { $this->ext = $this->convertJpg ? 'jpg' : $this->ext; $this->name = $this->getFileName();