WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Dan Harrison
    Member
    Posted 1 year 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?

    Thanks
    Dan

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Dan Harrison
    Member
    Posted 1 year 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)

    Thanks
    Dan

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.