You have a bad design because IIS need some how to know what kind of file is, and is use the extension of the image to do that. With out the extension you have an alternative to add some code on global.asax
and filter it by the directory as:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
string cTheFile = HttpContext.Current.Request.Path;
string sExtentionOfThisFile = System.IO.Path.GetExtension(cTheFile);
// if this is a file inside the directory images
// and did not have extention
if ( cTheFile.Contains("/images/", StringComparison.InvariantCultureIgnoreCase)
&& sExtentionOfThisFile.Equals(".", StringComparison.InvariantCultureIgnoreCase)
)
{
// then send the Content type of a jpeg (if its jpeg)
app.Response.ContentType = "image/jpeg";
}
}
but I suggest you if this is easy to return the extension on the images, and let IIS handle the ContentType, and the Cache set of the images.
The code may need some tweeks because I do not have test it as it is.
Also for this to make work, you must have setup iis to proceed from asp.net the file with out extensions.