/** * Resize an image instance for the given file. * * @param \SplFileInfo $file * @return \Intervention\Image\Image */ protected function formatImage($file) { return (string) $this->images->make($file->path())->fit(300)->encode(); }