- file_get_contents: documentation ( source)
- base64_encode: documentation ( source)
<?php
$test = file_get_contents("https://pbs.twimg.com/media/COMFAk-WoAA4Fsv.jpg");
$test = base64_encode($test);
$test = '<img src="data:image/jpeg;base64,' . $test . '" />';
echo $test;
?>