Which Script Outputs Images?

When rtmedia outputs images in the album, activity, etc. in a BuddyPress site, I would like to prefix the image URLs with my CDN’s URL, something like:


This allows me to exploit the various image transformation features, etc. of my CDN. Where in the rtmedia code would I need to look to find what’s responsible for outputting the image URLs? Or is there a hook I can use (preferable) to prepend the outputted image URLs?