F
Filament15mo ago
EmmieB

Decode and display base64 image.

How do I decode a base64 image from my database and display it in a table within a resource?
3 Replies
Saade
Saade15mo ago
ImageColumn::make()
->extraImgAttributes(
fn (string $state) => ['srcset' => $state]
)
ImageColumn::make()
->extraImgAttributes(
fn (string $state) => ['srcset' => $state]
)
cheesegrits
cheesegrits15mo ago
@Saade Wouldn't you need to prepend "data:image/png;base64, " to the raw base64 data in the srcset? Or are we assuming that's already in the data?
Saade
Saade15mo ago
Assuming its already on the data
Want results from more Discord servers?
Add your server