So I have an image string that I insert into a webpage with a header telling the browser it is an image.
So a page would look like this:
<?php
header('Content-Type: image/png');
echo $image_data;
?>
http://website.com/randomString.png
is used to grab the image (using .htaccess)
When I use the following code, I get the error FPDF error: Unsupported image type
$imagePath = file_get_contents("http://website.com/".$randomString.".png");
$pdf->Image($imagePath,159,185,27);
Does anyone know what I can do to get rid of this error?