F
Filamentβ€’8mo ago
Lara Zeus

using ImageColumn with data:image

I have an image in db stored as data:image
data:image/png;base64,iVBORw0KGgoAAAANSUhE.....
data:image/png;base64,iVBORw0KGgoAAAANSUhE.....
when using the ImageColumn the images not shown the source is always empty <img src class="" ... trace it back to
public function getImageUrl(?string $state = null): ?string
{
if (filter_var($state, FILTER_VALIDATE_URL) !== false ||
// added
str($state)->startsWith('data:')
) {
return $state;
}
public function getImageUrl(?string $state = null): ?string
{
if (filter_var($state, FILTER_VALIDATE_URL) !== false ||
// added
str($state)->startsWith('data:')
) {
return $state;
}
Solution:
I made a PR and it merged πŸ‘
Jump to solution
1 Reply
Solution
Lara Zeus
Lara Zeusβ€’8mo ago
I made a PR and it merged πŸ‘