We know that after images are formed as a result of latency in the retinas of our eyes. So if they are in our eyes or, more likely, in our brains, why do we see them in front of our eyes? How do they get out there?
The good news is that this feature of after-images seems no more difficult to explain than how we see physical object like a table 'out there'. True, there is an actual table out there while there is nothing corresponding to the after image out there, but this makes no difference. In both cases, something inside our head is managing to present something as out there. (Fortunately, the table doesn't come into our heads when we see it.) So I think your question is just how the brain or the mind manages to see things as outside itself, whether there really are those things out there or not. The bad news is that we really seem to have no idea how this is possible (which is not to say that philosophers -- including notably Immanuel Kant -- haven't spent a lot of time worrying about it).