Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ignaciodev's avatar

Filament FileUpload image not deleting inside BuilderBlock

I have a Page model with a sections json column that casts as array. For these sections, I am using Laravel Filament's Builder\Block. Here is one of my blocks:

Builder::make('sections')
   ->reorderableWithDragAndDrop(false)
   ->reorderableWithButtons()
   ->blocks([
        // ... blocks
]);

One of my blocks has a background image that use like this:

FileUpload::make('background_image')
    ->image()
    ->disk('public')

It works great on the create page (uploading and deleting the image).

However, on the edit page, when I click the delete (x) button of the FileUpload component, it doesnt delete the image. Instead, it opens the file browser.

If, once the file browser is opened, I select a different file, it doesnt replace it, it glitches.

Am I doing something wrong? I should be able to remove the image, just like I can on the create page.

0 likes
1 reply
ignaciodev's avatar

Ok, it seems to be a bug that happens to FileUpload when the Builder\Block it's contained in is collapsed by default. Makes the delete button not respond.

If I remove the collapsed() method, the issue goes away.

I will report this on Filament's github.

Please or to participate in this conversation.