Please refer to the answer you were given the last time you asked this question:
Sir, I am a new developer, so i try to learn, I have tried many times. but something wrong. I don't understand and it is not working. please create new code for me.
Try this SO thread, there seems to be a working example there,
Not Working, please check it
$type = pathinfo($dp, PATHINFO_EXTENSION);
$data = file_get_contents($dp);
$imgdata = base64_encode($data);
$src = 'data:image/'.$type.';base64,'.$imgdata;
<?php echo '<img class="img-fluid" src="'.$src.'" style="width:80px;">'; ?>
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.