Private Image not showing

Form:
FileUpload::make('image')
->image()
->disk('local')
->directory('post-images')
->visibility('private')
->placeholder('Upload an image')
->columnSpanFull()
->required(),

Column:
ImageColumn::make('image')
->disk('local')
->visibility('private'),

Error: Still not viewable. Do I need to set up the other configuration files?
Solution
Thanks, @Dennis Koch @awcodes .
I realized that using the column foto in both the database as a column name and in the filesystems.php config file was causing the problem.

I discovered when I noticed that setting up the label for "fotos" was ignored in the resource table:
return $table
            ->columns([
                Tables\Columns\ImageColumn::make('foto')
                    ->disk('fotos')
                    ->label('Fotografía') //IGNORED
                ,

then I started changing the name to whatever and test the label()to see whether or not was ignored.

So, finally it worked when I changed the word "foto" to something else:

 Forms\Components\FileUpload::make('avatar')
                    ->label('Fotografía')
                    ->image()
                    ->disk('avatares')
                    ->storeFileNamesIn('avatares')

//....
return $table
            ->columns([
                Tables\Columns\ImageColumn::make('avatar')
                    ->disk('avatares')
                    ->label('Fotografía') //no longer ignored
                ,

and in filesystems.php
       'avatares' => [
            'driver' => 'local',
            'root' => storage_path('app/path/to/avatares'),
            'visibility' => 'private',
            'url' => env('APP_URL').'/avatares',
        ],

So, "private" visibility was not causing any problem.

now it finally is working 🎉
Was this page helpful?