Support » Plugin: W3 Total Cache » MaxCDN Sub-Directory Images Not Being Pulled Completely

  • Greetings!

    I’ve been equiping up my multisite installation with MaxCDN and have had a wonderful time getting set up and support for my main domain ( However, a secondary install ( mapped to was not showing any images as being hosted at the CDN.

    I read some other forums and found a partial solution: if I add “{wp_content_dir}/uploads/sites/*” to my custom file list in the CDN settings, my in-post images will now be pulled properly.

    However, featured images or imgs in my sidebar are still a problem. I’ve tried changing the custom feed url to “{wp_content_dir}/uploads/*” or “{wp_content_dir}/uploads/sites/#/*” with no luck.

    I’ve even found some code that could work but it’s for WP Super Cache and anyway, I’d rather not edit the plugin as it will be lost in an update (/I don’t know what I’m doing and will probably break it):

    I would appreciate any suggestions that could be made – for me to try, or even just learn more about. I’ve exhausted all search terms I can come up with and definitely need some more reading material. 🙂


Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey @will, thanks for sharing that thread with me!

    I feel conflicted, because I’m on multisite so my *installation* is technically in the root folder, though a site instance is also at /oncecoupled, so it seems as if these problems could be unique.

    Was your site also pulling some images, but not others? Since that’s the only issue I’m having, it would certainly confirm the same problem is occurring.

    This definitely gives me some food for thought. I don’t mind waiting on an update if that’s the case – I’ve can stop pulling my hair out in frustration over this!

    My site works fine for images and content that comes from the “default” folders. But it does not work for anything that needs to be listed in the “custom files list”.

    I created two identical sites to demonstrate the issue. The only difference between the sites was that one was not at the root level. That site did not have the URLs updated for the CDN.

    BTW. Remember to check the source code of the pages. That’s the most reliable way to determine if W3TC is properly replacing the local URLs with the CDN URLs.

    Yes, the source code is how I know “in-post” images are being served by the CDN but “featured images” are not.

    The weird thing is that none of the images were being served until I added “{wp_content_dir}/uploads/sites/*” to the custom files list and now only some of those images are being served – even though they are located in the same folder. (Eg. uploads/sites/4/2014/02)


    After speaking with MaxCDN several times and receiving some absolutely wonderful advice from them, I noticed a pattern in the images that were or were not being served. (Staring at source code for hours on end and I hadn’t noticed this yet?!)

    • The images that are replaced properly have the correct domain name: eg. “”
    • The images that are causing problems are using the correct sub-domain name: eg. “”

    With this realization, it seemed that domain mapping was *actually* what I needed to look in to. Armed with a new arsenal of search terms, I pretty quickly came across this:

    Which, in short, is the solution! Click over there for the answer to both featured image paths in multisite mapped domains, edit media file urls in multisite mapped domains, and as a result of these, cdn images not being served properly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘MaxCDN Sub-Directory Images Not Being Pulled Completely’ is closed to new replies.