There are several ways of going about this. One option would be for the server to stream the images from the path in the database to the browser, for example if using PHP this would look like:
$size = getimagesize($fname);
// Now that you know the mime type, include it in the header.
header('Content-type: '.$size['mime']);
// Read the image and send it directly to the output.
readfile($fname);
There are equivalent methods in any other server side scripting language.
Specifically, here's a tested sample code that does this. On the server side:
<?php
$param = $_GET["image"];
$fname = "/Users/myuser/images/$param"; // replace with your path
$size = getimagesize($fname);
header('Content-type: '.$size['mime']);
readfile($fname);
?>
On the client side
<html>
<head></head>
<body>
<img src="http://127.0.0.1/img.php?image=test1.png" />
<img src="http://127.0.0.1/img.php?image=test2.png" />
</body>
</html>