WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: W3 Total Cache] Change image paths in CSS to CDN

[Resolved] [Plugin: W3 Total Cache] Change image paths in CSS to CDN

Viewing 7 replies - 1 through 7 (of 7 total)
  • Yes, it does that automatically.

    Hi,

    I had the same problem and it’s something I commented on in my post here:

    http://www.ichilton.co.uk/blog/wordpress/wordpress-caching-plugins-and-observations-with-w3-total-cache-184.html

    I believe it’s because the url starts with / so it serves it from the same domain as the css (which if you are using the automatic minify mode will be the domain of your site rather than the CDN).

    If you do create a patch, i’d be interested to see it as I was looking to do the same thing but have not had chance yet.

    Thanks,

    Ian

    Amir Helzer
    Participant

    @amirhelzer

    Thanks Ian,

    I’ll check with relative URLs and see if it works. If it does, it’s going to be a big speed improvement for loading the entire page.

    Cool – let me know how you get on as i’d like to get the same working.

    Thanks,

    Ian

    Amir Helzer
    Participant

    @amirhelzer

    Actually, kfawcett, can you point me to the code that does the URL replacements for CDN and the code that creates the minified CSS files?

    I’d be happy to debug it, see why it’s not working for us and provide a patch. It would help if I know what I’m looking for.

    Plugin Author Frederick Townes
    Member

    @fredericktownes

    Was there any remedy?

    Amir Helzer
    Participant

    @amirhelzer

    Once we got the CSS files themselves served from the CDN, the linked images (from the CSS) started coming from the CDN as well.

    For this to happen, the CSS must reference these images with relative paths (paths that don’t have the domain name). This way, the images would come from whatever domain the CSS file is in.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: W3 Total Cache] Change image paths in CSS to CDN’ is closed to new replies.