header->store('artist_headers', 'static'); Image::load($disk->path($header)) ->manualCrop($this->width, $this->height, $this->x, $this->y) ->save(); Image::load($disk->path($header)) ->width(270) ->height(185) ->save(); ImageOptimizer::optimize($disk->path($header)); auth()->user()->artists()->first()->update(compact('header')); $this->header = null; return redirect(request()->header('Referer')); } }