Hi xykotik,
VWS does the same type of thing when creating its own web pages, you use a file with the extension .htx as the template and you can have it spit it out in whatever filename you like. The .htx could then be in any format you want, html, php etc. and VWS just fills in the variables with the data.
The specific instance I'm referring to is that during the FTP process that lets the FTP upload the file to the server as a temporary file name, then rename that to the final product (page) name that you use on your website.
I'm not sure if that technique, or the technique of just uploading the file straight out with the desired page name (or image name in my problem instance) allows for a very short period of the file (image) not existing, that give the page the opportunity on a refresh to have an image not found problem.
Being rather new to web publishing though, it may well be the way I have written my code. That's what I'm trying to find out, if I need to allow something for the instant that the image is being refreshed (uploaded) on the server, or whether IIS 7.0 and ASP.NET should cover for you and if the file is in use, pause until it is available before rendering the image.