Getting Error: NotReadableException in AbstractDecoder.php line 302

后端 未结 2 1102
孤街浪徒
孤街浪徒 2020-12-22 08:36

I am following a turtorial on how to save photos and resize them as thumbnails using PHP, Laravel 5.1, MySQL, InterventionImage plugin, and am getting the following error wh

相关标签:
2条回答
  • 2020-12-22 09:16

    It looks like your path is not being set correctly here:

    $this->path = sprintf("%/%s", $this->baseDir, $this->name);
    

    Shouldn't that be...

    $this->path = sprintf("%s/%s", $this->baseDir, $this->name);
    
    0 讨论(0)
  • 2020-12-22 09:20

    I did the same tutorial , you should do like this

    Image::make($this->path.$this->name)->resize(128, 128)->save($this->thumbnail_path.$this->name);

    instead of doing this

    Image::make($this->path)->fit(200)->save($this->thumbnail_path);

    0 讨论(0)
提交回复
热议问题