Closed instanceofman closed 10 months ago
Hey @instanceofman! We're sorry to hear that you've hit this issue. 💛
However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?
We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.
there is a method called checkFileExistence
that you can use like follow:
ImageColumn::make('thumbnail')
->circular()
->checkFileExistence(false)
->extraImgAttributes(['loading' => 'lazy']);
there is a method called
checkFileExistence
that you can use like follow:ImageColumn::make('thumbnail') ->circular() ->checkFileExistence(false) ->extraImgAttributes(['loading' => 'lazy']);
Thank you!
Package
filament/tables
Package Version
v3.0.94
Laravel Version
10.33.0
Livewire Version
v3.1.0
PHP Version
PHP 8.1.26
Problem description
I'm using R2 (cloudflare s3 storage) to host my app's images. I have problem rendering component which use ImageColumn. Checking the profiler, I discovered the cause was because method
Filament\Tables\Columns\ImageColumn@getImageUrl
checked for the existence of the image before displaying it, it called an http request, so it make rendering slow...Let see demo in the attachments:
When use ImageColumn:
Profiler shown
When I comment out the ImageColumn
Filament\Tables\Columns\ImageColumn@getImageUrl
Expected behavior
It should not take ~820ms to render a simple component.
Steps to reproduce
I've posted in problem description yet.
Reproduction repository
https://github.com/filamentphp/filament/tree/3.x/packages/tables
Relevant log output
No response