mirror of
https://github.com/the-programmers-hangout/Hermes.git
synced 2026-09-04 01:06:00 +02:00
move to b64 images
This commit is contained in:
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user