You can't send a string back. You need to send the image itself. When the IMG
tag source is looked up by a browser, the browser expects to receive back a file.
The easiest way to do this from your application is by a URL redirection.
Otherwise, you'd have to output the relevant MIME headers and send the file data yourself. This is only necessary if you're doing things like dynamically watermarking or resizing an image, or if the image is not publicly available.