I have some jpeg
images as base64
encoded
I checked the mime type
this way
$str = "..."; // base64 code
$imgdata = base64_decode($str);
$f = finfo_open();
$mime = finfo_buffer($f, $imgdata, FILEINFO_MIME_TYPE);
echo $mime . '<br><br>';
result - image/jpeg
Trying to display the image
<img src="data:image/jpeg;base64, <?php echo $str; ?>" alt="img">
result - there is no any image
echo $str;
result - base64 code is echoed
is there any way to check what is wrong with the base64
code
here is a live example - https://abuena.net/base.php