/var/www/html/vendor/intervention/image/src/Intervention/Image/Image.php
edit this file
change this :
if (is_null($path)) {
throw new Exception\NotWritableException(
"Can't write to undefined path."
);
}
$data = $this->encode(pathinfo($path, PATHINFO_EXTENSION), $quality);
$saved = @file_put_contents($path, $data);
if ($saved === false) {
throw new Exception\NotWritableException(
"Can't write image data to path ({$path})"
);
}
// set new file info
$this->setFileInfoFromPath($path);
return $this;
}`
to this :
$pathInfo = pathinfo($path); $data = $this->encode($pathInfo['extension'], $quality);
if(!\File::exists($pathInfo['dirname'])){ \File::makeDirectory($pathInfo['dirname']); }
|