Well, I dunno how often people say, "here ya go, here's exactly what you need!" Let's both hope that somebody gives you a better "lead." But when I read this I thought this sounded like an application for Web proxy. I remember a class called Snoopy that works very well for this and it's freely distributed. It does not, however, do exactly what you are asking. I'm only suggesting it because I know I'd be looking for a way to match and replace all "src=" in my HTML body. I'm somewhat certain that Snoopy performs this for proxying and you may be able to open the hood and get some clues.