I have used the construct <img src="http://yoursite.com/image.php?request_id=XXXX">
and it works well to serve images that may need some preprocessing. However, if image.php requires a lot of arguments, the src can become very clumsy. Therefore I thought of wrapping image.php into a function, and bundling it to my content page with include_once "image.php"
.
The strategy, however, produces the dreaded "Cannot modify header information" error. I believe this is because there is already output on the page, before the img is referenced. Does that mean that it is impossible to output an image src by function rather than by GET a separate file?