@php // function getdataurl($imagePath) { // $finfo = new finfo(FILEINFO_MIME_TYPE); // $type = $finfo->file($imagePath); // return 'data:' . $type . ';base64,' . base64_encode(file_get_contents($imagePath)); // } @endphp