Bradgrafelman,
Without getting into an EXTREMELY long explanation - I am not the original author of the site, and there is a lot going on.
The image tags are spread throughout the database, static files (hundreds) and this needs to be moved to CDN for only http (not ssl) traffic.
In any capacity I would have to have PHP parse the entire page every time, or mod_sed do the same, to me it's neutral, but rather than putting if http(s) statements I could just run it for non-ssl avoiding the condition all together once SSL.
Unless you can suggest a better approach (yes - we are redeveloping the site, but I need interim solution)