I’m sorry for the inconvenience. I was not aware of the issue, thank you for reporting.
I’m going to wok on this issue in a few days.
Oh, and what do you use to manage your CDN in WordPress? A particular plugin? What I’m wondering is: how a plugin which store some files in wp-content (which must be the case of several plugins) is supposed to deal with CDN in a generic way?
I am using the Azure storage plugin. There are many others that deal with CDN’s.
I believe that all of these plugins would use the media library, so perhaps you could tap into that?
Hum… You’re right, the Media Library is probably where I need to look first. Thanks!
Just to let you know that I investigated this feature. wp insert attachment is a good starting point. However, I currently have more questions than answers.
FYI I posted a question: http://wordpress.stackexchange.com/questions/192670/strategies-for-a-plugin-to-support-cdn-enabled-wordpress-sites
19 days later, I have no answer to my question above on StackExchange. I’m very surprised, since CDN should disrupt several plugins so this should be a classic topic. Maybe I miss something…
So stay tuned, but just to let you know that fixing this may take longer than it should…
Small update: a WP site is using a CDN and there is no problem with RealFaviconGenerator (see https://wordpress.org/support/topic/favicon-missing-in-firefox-for-mac). Although this has nothing to do with your particular issue, that might help me understand how a plugin should (or shouldn’t) deal with CDN.