Answers for "save base64 image to folder php"

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

Code answers related to "save base64 image to folder php"

Browse Popular Code Answers by Language