In lfmhelpers.php line 335 replace the return with this:
return lcfirst(str_singular(request('type') ? request('type') : '')) === 'image';
and in vendor/unisharp/laravel-filemanager/src/views/index.blade.php line 209
replace with this:
acceptedFiles: "{{ lcfirst(str_singular(request('type') ? request('type') : '')) == 'image' ? implode(',', config('lfm.valid_image_mimetypes')) : implode(',', config('lfm.valid_file_mimetypes')) }}",
maxFilesize: ({{ lcfirst(str_singular(request('type') ? request('type') : '')) == 'image' ? config('lfm.max_image_size') : config('lfm.max_file_size') }} / 1000)
Hope this helps, it works in mine.