You can build a REST api. The php script below can be used to server up images (even from outside the web root).
You can call up an image like so:
http://myserver.com/script.php?i=image.jpgThis is just a basic example good for testing, but wouldn't use in production without some extra security in place (sanitizing the input)
+ Code Snippet<?php
$file = '/path_on_server/'.$_GET['i'];
header('Content-Type:image/jpeg');
header('Content-Length: ' . filesize($file));
readfile($file);
?>