This is based off a past question of mine, but its a different question and I think making a new question will help many people who have this problem also.
Here is what I have
<img src="data:image/png;base64,<?php echo picture(); ?>" />
The image shows up as a broken image, and when inspect it as an element it shows up as the correct thing.... but with some weird tags at the end
{base64 data}<html>
<head>
<title>Test</title>
</head>
<body>
<img src=" data:image="" png;base64,<html="">
Does anyone know why this is? Its so bizarre.
Thanks!
Edit: So the title of the page is "Test"... but i dont get why its all showing up in the image tag
As noted by Dagon use of data:image is bad idea as you then depend on browser's implementation (which is out of your control and often it is broken).
I suggest you to use link to php script
getpicture.php: