Image is not showing on filament admin panel

I saved full URL of image in database including domain url because I import image url from another panel of CMS, now its not showing in filament admin panel, because its not in storage folder. FilamentPHP admin panel can display these external images ?
9 Replies
thyk123
thyk1232mo ago
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Dennis Koch
Dennis Koch2mo ago
Showing where? You don’t provide any code or further explanation so it’s impossible to help.
kartikey_maandothiya
This is the screenshot of my database where you can see images are imported not uploaded now I want to show this images in filament admin panel. I am able to show images in table but not in forms
Tables\Columns\TextColumn::make('thumb_image')
->label('Image')
->formatStateUsing(function ($state) {
return "<img src='$state' alt='Product Image' style='width: 150px; height: auto;' />";
})
->html(),
Tables\Columns\TextColumn::make('thumb_image')
->label('Image')
->formatStateUsing(function ($state) {
return "<img src='$state' alt='Product Image' style='width: 150px; height: auto;' />";
})
->html(),
this code of image column in table but unable to show in forms
Forms\Components\Repeater::make('images')
->relationship('images')
->schema([
Forms\Components\FileUpload::make('images')->directory('products/gallery')->multiple()->label('Thumb Images')->image(),
])->collapsible()->columns(1),
Forms\Components\Repeater::make('images')
->relationship('images')
->schema([
Forms\Components\FileUpload::make('images')->directory('products/gallery')->multiple()->label('Thumb Images')->image(),
])->collapsible()->columns(1),
No description
No description
No description
kartikey_maandothiya
How to show this image URL's in filament admin panel's form image fields.
Dennis Koch
Dennis Koch2mo ago
I am able to show images in table but not in forms
Why aren't you using in ImageColumn? I think that should work with URLs too.
but unable to show in forms
I don't think FileUpload will work with mixed content (URLs and local storage). You should decide on one. Maybe it's just a CORS issue and it might show them (check your DevTools console).
kartikey_maandothiya
I am using FileUpload because i want to upload image again direc to other server and will get url and stored in db tables and then I waill show images in forms
Dennis Koch
Dennis Koch2mo ago
Yeah, not sure whether both at the same time will work. Did you check for CORS issues?
kartikey_maandothiya
yes its not about CORS