© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
14 replies
bionary

Show First image: SpatieMediaLibraryImageColumn

How can I limit the "thumb" image in my table to the first image only when my record has more than one Spatie Media records associated?

I am using SpatieMediaLibraryImageColumn and always have several media images related...but they are cluttering up the table. I want to show the first one only.

I thought I could directly fetch what I need (pseudo-code):
->getStateUsing(fn($record) => $record->getFirstMedia()...)
->getStateUsing(fn($record) => $record->getFirstMedia()...)


But, it appears that
->getStateUsing()
->getStateUsing()
is ignored completely
Solution
try:

->limit(1)
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SpatieMediaLibraryImageColumn not showing image.
FilamentFFilament / ❓┊help
2mo ago
Show Image in InfoList
FilamentFFilament / ❓┊help
3y ago
Class SpatieMediaLibraryFileUpload & SpatieMediaLibraryImageColumn not found
FilamentFFilament / ❓┊help
2y ago
image not show. please help
FilamentFFilament / ❓┊help
16mo ago