I want seamless integration of Jetpack’s Photon CDN service with the images served by AdRotate, but it appears there currently isn’t any filters which make it possible to update the image URL used by an ad. I’ve come up with a patch to add in this functionality, and I would love to see it adopted in the next official version for others to make use of.
There’s only one line needing to be added to the plugin to accommodate this, but I’ll show more code for context. Open adrotate-output.php and update it so there’s a new line with the apply_filters function as seen here:
Oh, and here’s the code I added to my theme’s functions.php file to make use of that new filter so all images used by AdRotate are automatically passed through the WP.com CDN via Jetpack’s Photon feature (when available).
// Send images in AdRotate through Jetpack's Photon CDN service
This would otherwise not be possible without this filter being added. Keep in mind that this will stop working if AdRotate is updated without including this new feature (as it will overwrite the patch adding the new filter).