View Single Post
  #5  
Old 1st July 2019, 19:55
Stortebeker Stortebeker is offline
Member
 
Join Date: May 2019
Posts: 8
Default
/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']); }
Reply With Quote