Skip to content

FileUpload->imagePreviewHeight() does not set the preview height if video is uploaded #19373

@ahmedshaharyarX

Description

@ahmedshaharyarX

Package

filament/filament

Package Version

v5

Laravel Version

v12

Livewire Version

v4

PHP Version

8.4

Problem description

The ->imagePreviewHeight() method on the FileUpload component has no effect when uploading videos. Regardless of the value provided, the preview height remains unchanged.

Example:

FileUpload::make('file_path')
    ->label('Video')
    ->acceptedFileTypes(['video/*'])
    ->visibility('public')
    ->disk('bunnycdn')
    ->deleteUploadedFileUsing(fn ($file) => Storage::disk('bunnycdn')->delete($file))
    ->nullable()
    ->removeUploadedFileButtonPosition('right')
    ->downloadable()
    ->imagePreviewHeight('100') // tested '100' and '100px'
    ->columnSpanFull()
    ->openable();

Tried numeric '100', string '100', and '100px'—none affected the video preview height.

Expected behavior

The video preview should respect the height set via ->imagePreviewHeight(), e.g., 100px.

Steps to reproduce

Add the FileUpload component configured as above.

Upload a video file.

Observe that the preview height does not change.

Image

Reproduction repository (issue will be closed if this is not valid)

https://github.com/Shaharyar-WebDev/qbl-platform

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions