© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
3 replies
DocRampage

FileUpload with PDF preview.

Hi,

im using spatie media file uploads and the spatie pdf-to-image package.
But when im uploading a PDF there is no preview shown, even if the thumbnail gets generated.
Regular images are shown as previews.

SpatieMediaLibraryFileUpload::make('file')
            ->conversion('thumb')
            ->collection('files')
SpatieMediaLibraryFileUpload::make('file')
            ->conversion('thumb')
            ->collection('files')

Is this expacted behavior? Or am im missing something. And if so, is there a way to show a thumb preview of the PDF, either with spatie or the regular fileupload?
Solution
For anyone interested in this. Thats expected behaviour. Under the hood the file upload component uses filepond, which does not support PDF previews. There are plugins for filepond that make pdfs previewable but its not that easy to install these plugins in the filament filepond version. Another option is to use spatie pdf to image, which also required some manual coding.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

PDF Preview
FilamentFFilament / ❓┊help
3y ago
Error FileUpload Preview
FilamentFFilament / ❓┊help
2y ago
FileUpload custom preview.
FilamentFFilament / ❓┊help
2y ago
FileUpload forbidden on preview
FilamentFFilament / ❓┊help
6mo ago