$tempDir = "qrcode/temp_img/";
$image_path="qrcode/test.jpg";
$photo = base64_encode(file_get_contents($image_path));
// here our data
$name = $lastName." ".$EmployeeName;
$sortName = $EmployeeName.";".$lastName;
$phone = $PhoneNumber;
$email = $EmailAddress;
// we building raw data
$codeContents = 'BEGIN:VCARD'."\n";
$codeContents .= 'VERSION:2.1'."\n";
// $codeContents .= 'N:'.$sortName."\n";
$codeContents .= 'FN:'.$name."\n";
$codeContents .= 'TEL;WORK;VOICE:'.$phone."\n";
$codeContents .= 'EMAIL:'.$email."\n";
$codeContents .= 'PHOTO;JPEG;ENCODING=BASE64:'.$photo."\n";
$codeContents .= 'END:VCARD';
// generating
QRcode::png($codeContents, $tempDir.$EmployeeID.'.png', QR_ECLEVEL_L, 3);
// displaying
echo '<img src="'.$tempDir.$EmployeeID.'.png" />';
I try to include the photo to the qr code business card but it cannot be generate and it gave me an error "Wrong Version".