I can think of two options:
First, embed the image directly in the HTML documents, see http://www.techerator.com/2011/12/how-to-embed-images-directly-into-your-html/ http://webcodertools.com/imagetobase64converter
Second, in the HTML documents, write the image tag as usual:
<img src="/remote_images/show/whatever.png" alt="whatever" />
Then you create a RemoteImages
controller to process the requests for images. In the action show
, the images will be downloaded and returned with send_data.
You don't have to manage temporary files with both of these options.