@php function GetImageBase64($imagePath){ $type =pathinfo($imagePath,PATHINFO_EXTENSION); $data =file_get_contents($imagePath); $pic ='data:image/'. $type .';base64,'. base64_encode($data); return $pic; } @endphp