Infolist ImageEntry question

Hi Guys,


I am able to save the file to the local disc in my create form:
FileUpload::make('attachments')
                        ->columnSpanFull()
                        ->label('POD Image')
                        //->disk('public')


And I can see the uploaded file in this folder: /storage/app/public/ and this is working well.

However, I have a question regarding the infolist ImageEntry which I want to use to display said image.
According to the docs:
The entry must contain the path to the image, relative to the root directory of its storage disk, or an absolute URL to it.

So in order to test this, I have ensured that there are 2 images in the public disc: sushi.jpg and test.jpg
I have tried the following ways to display an image:

ImageEntry::make('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRy1FCk4ILwKxcNzcvjHpj0lqPVfuUCGKeg2w&s')
                ->label('POD Images6')
        ->height(500)
        ->width(500),

ImageEntry::make('test')
                ->label('POD Image 7')        
        ->height(500)
        ->width(500),

ImageEntry::make('test.jpg')
                ->label('POD Image 8')        
        ->height(500)
        ->width(500),

ImageEntry::make('sushi')
                ->label('POD Image 9')
        ->disk('public')
        ->height(500)
        ->width(500),

ImageEntry::make('sushi.jpg')
                ->label('POD Image 10')
        ->disk('public')
        ->height(500)
        ->width(500),


I can understand if the formatting is wrong for the rest of these configs, but surely the absolute path ImageEntry should work?

I cannot see any relevant information in the laravel log either, anyone have any idea what I am doing wrong here?

Thanks in advance
Solution
in the make you provide a db column
Was this page helpful?