Maybe we can do this:
First of all, we use a PHP script to
display the image in browser.
the sript will read data from database or from a file. If the script read data from
a file, then it could be a temporary file
that is out of the "htdocs" directory tree.
we can add a image in a web page like this:
<img src="myscript.php3?image_num">
the script myscript.php3 read data from the
temporary file and echo it and then delete it.