Answers for "Image::make base64"

PHP
7

php image to base64

$path = 'myfolder/myimage.png';
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
Posted by: Guest on October-02-2020
2

img src data base64

<img src="data:image/png;base64,..." /> <!-- Replace png with the mime type of the image --!>
Posted by: Guest on March-01-2021

Browse Popular Code Answers by Language