avatar->store('avatars', 'static'); Image::load($disk->path($avatar)) ->manualCrop($this->width, $this->height, $this->x, $this->y) ->save(); Image::load($disk->path($avatar)) ->width(350) ->height(350) ->save(); Log::info('Avatar: Optimizing ' . $disk->path($avatar)); OptimizeAvatarJob::dispatchSync($disk->path($avatar)); //ImageOptimizer::optimize($disk->path($avatar)); auth()->user()->artists()->first()->update(compact('avatar')); $this->avatar = null; return redirect(request()->header('Referer')); } }