1. Ensure that your external F5 can reach the internal sites, or at least that it can reach the internal F5 where that content can be fetched from in a specific virtual server.
2. If the client makes a request for "/avatars/filename.jpg", divert the request to an alternative pool. This can be done with an iRule. This "avatar pool" would contain either the internal servers or a VS in your internal F5.
3. In the same iRule you'll probably have to rewrite the host and uri parts, and that must be done transparently to the client - meaning: no redirects involved in the operation.