by Davo Smith.
One option is to grab the contents of the file (via $file->get_contents()), then call base64_encode() on the contents and then output the image tag as:
<img src="@[base64 encoded file contents]" />
TCPDF uses the @ to indicate that the image content has been inlined into the tag.
If you aren't generating the image link yourself, then you'll probably need a regular expression to extract all the 'pluginfile.php' links (within img tags) and then extract the relevant details to get the stored_file object.