protected function buildThumbnails($files)
    {
        $thumbnails = [];

        foreach ($files as $file) {
            if (file_can_have_thumbnail($file)) {
                $thumbnails[$file] = (string) $this->image
                    ->make(Storage::get($file))
                    ->resize(20, 20)->encode('data-url');
            }
        }

        return $thumbnails;
    }
protected function buildThumbnails($files)
    {
        $thumbnails = [];

        foreach ($files as $file) {
            if (file_can_have_thumbnail($file)) {
                $thumbnails[$file] = (string) $this->image
                    ->make(Storage::get($file))
                    ->resize(20, 20)->encode('data-url');
            }
        }

        return $thumbnails;
    }
protected function buildThumbnails ( $ files ) { $ thumbnails = [ ] ; foreach ( $ files as $ file ) { if ( file_can_have_thumbnail ( $ file ) ) { $ thumbnails [ $ file ] = ( string ) $ this -> image -> make ( Storage :: get ( $ file ) ) -> resize ( 20 , 20 ) -> encode ( 'data-url' ) ; } } return $ thumbnails ; }
Build thumbnails for each files that is image type.

@param \Illuminate\Support\Collection $files
@return array
Build thumbnails for each files that is image type .