Given the use case you described, I believe that the only solution is one in which the URL paths are the same in both the local and production environments. For example, given the following hierarchy:
- content - images - dinosaur.jpg - posts - my-dinosaur.md
... you can link to an image from my-dinosaur.md with:
Title: My Dinosaur Date: 2013-03-28 URL: /posts/my-dinosaur.html Save_as: posts/my-dinosaur.html Here is an image of my dinosaur: 
In this case, the generated HTML will contain a link to the image, which looks like this:
<img src="../images/dinosaur.jpg" />
So far, the relative positions between:
- source document ↔ image
- generated HTML ↔ image
... are the same, the above method should allow you to perform your tasks.
Of course, depending on the URL structure you choose, this may or may not be feasible. If you do not want to change the structure of URLs in accordance with the organizational structure of the source content, it will be difficult to display the image in both environments without starting the local server.
source share