Ads are inserted directly into the feed. The ads are actually inserted as images, even if they're text, so that the ads are only actually generated when the image is displayed.