W3 Total Cache
[resolved] Applying CDN replacement to images outside WordPress (2 posts)

  1. Dan Harrison
    Posted 3 years ago #

    Hi Frederick

    W3TC is awesome, been using it for a while and really love it. So thanks. Got a question about using CDNs.

    From a CDN point of view, I've got images outside of WordPress that I want to replace with a CDN-compatible URL, using the CDN settings that are stored in W3TC. Since they're outside of WP, W3TC doesn't see them. But I specifically want to use the settings in W3TC to make life easier for the client.

    From a technical point of view (I'm a WP developer), what's the best way to override the URL to use the CDN settings in your plugin?

    1. apply_filters()
    2. Or something else?



  2. Dan Harrison
    Posted 3 years ago #

    Hi Frederick

    Found the answer with a bit of experimentation. Sharing my answer for the benefit of others:

    To use the CDN for other files outside the normal WordPress file structure, you need to add the path to the CDN option in W3TC.

    1. Go to the CDN page in settings
    2. Find the Advanced section
    3. Find 'Custom file list:'
    4. Add your path to it. e.g. mine was wp-content/imagecache/
    5. Save! (and flush page cache)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.