Instead of manually deciding what goes to a CNAME pointing to a CDN, I'd rather use something more like this:
https://wordpress.org/plugins/cloudflare/
This uses the cloud flare API to allow wordpress to 'know' the original IP (otherwise the piwigo app sees the cloud flare source, and all those neat statistics built in become meaningless).
The wordpress plugin is GPLv2 and source is viewable here:
http://plugins.svn.wordpress.org/cloudflare/trunk/
I don't yet know enough about piwigo's plugins to attempt this. I need to do some reading and/or find a "hello world" walkthrough for piwigo plugin development.
-Josh
The CDNPlus plugin is CDN agnostic.
All PHP pages are still pointing to the origin. You can make your own stats by looking at the web server log.
The CDNPlus plugin try to off load the heavy resources like photos and videos.
You request is only for cloudfare but I use EgdeCast.
EgdeCast does provide reports.
Offline