© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
ChickenDev

ImageEntry src URL

I have a database column that contains a relative URL that, depending on context, needs to have a different domain and path prepended to it.

For example,
the DB column value is
/bysZeUvSPZPJnku4qkHF34CdgMG.jpg
/bysZeUvSPZPJnku4qkHF34CdgMG.jpg
and the same filename is used for a thumbnail using the
https://domain.com/w/100
https://domain.com/w/100
prefix and for the main image using the
https://domain.com/w/500
https://domain.com/w/500
prefix.

How can I prepend these values to the ImageEntry component?

I have tried creating a special disk inside
filesystems.php
filesystems.php
using the following config
'remote_img_lg' => [
    'driver' => 'local',
    'root' => storage_path('app/public'),
    'url' => 'https://domain.com/w/500',
    'visibility' => 'public',
    'throw' => false,
]
'remote_img_lg' => [
    'driver' => 'local',
    'root' => storage_path('app/public'),
    'url' => 'https://domain.com/w/500',
    'visibility' => 'public',
    'throw' => false,
]

but when I use it in the component the
src
src
attribute of the
img
img
tag is not set.
Solution
Oh right. It's requiring
$state
$state
.
->getStateUsing(fn ($record) => 'https://domain.com/w/500'.$record->your_image_column)
->getStateUsing(fn ($record) => 'https://domain.com/w/500'.$record->your_image_column)
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

ImageEntry url
FilamentFFilament / ❓┊help
3y ago
ImageEntry relationship get url
FilamentFFilament / ❓┊help
2y ago
Zoom ImageEntry
FilamentFFilament / ❓┊help
2y ago
ImageEntry preview
FilamentFFilament / ❓┊help
3y ago