move to b64 images

This commit is contained in:
itsAzaria
2026-02-20 14:14:13 +00:00
parent a628eea61f
commit 6cd3504d76
4 changed files with 66 additions and 6 deletions
+12 -1
View File
@@ -6,7 +6,18 @@
return $placeholderImage;
}
$binary = (string) $image;
$value = (string) $image;
if (str_starts_with($value, 'data:image/')) {
return $value;
}
$binary = base64_decode($value, true);
if ($binary === false || $binary === '') {
return $placeholderImage;
}
$mime = 'image/png';
if (str_starts_with($binary, 'GIF8')) {