I have a jpg blob thats been stored in an external DB and I\'m looking to display that as an image via php. The issue is whenever I set the Content-Type
to
After continuing research I found this post PHP: create file from an HEX string
With the following code I fixed the issue.
<?php
header('Content-Type: image/jpeg;');
$data = 'The hex data';
$data = pack('H*',$data);
$im = imagecreatefromstring($data);
imagejpeg($im);
?>
Try $im = imagecreatefromstring($data);
The output it by imagejpeg($im);