Skip to content

Commit cbade34

Browse files
authored
Merge pull request #2701 from qskane/master
Fix base64 image can not display
2 parents 432afcd + bb22b7c commit cbade34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Grid/Displayers/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function display($server = '', $width = 200, $height = 200)
1414
}
1515

1616
return collect((array) $this->value)->filter()->map(function ($path) use ($server, $width, $height) {
17-
if (url()->isValidUrl($path)) {
17+
if (url()->isValidUrl($path) || strpos($path, 'data:image') === 0) {
1818
$src = $path;
1919
} elseif ($server) {
2020
$src = rtrim($server, '/').'/'.ltrim($path, '/');

0 commit comments

Comments
 (0)