WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Inline Background Image problem (2 posts)

  1. johnibom
    Member
    Posted 1 year ago #

    This question was originally asked @ Related Post Plugin Support page: http://wordpress.org/support/topic/plugin-related-posts-thumbnails-wont-use-images-from-cdn-loads-local-files-only?replies=6#post-3749049

    Basically, W3TC replaces all the images URLs to the CDN images URLs if it's enabled. This working fine if the images defined inside the CSS or inline img tag inside the pages/post/attachment etc..

    However, the related post plugin prints the images as a background image inline into the post/pages, there we have a problem with W3TC URL replacement. W3TC wont replace the local URL with the remote CDN URL.

    Any quick support will be appreciated!

    Thanks
    Mohsin

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

  2. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    f the paths start with '/' the replacement is done correctly, e.g.:

    <style>#main { background:#ffffff url(/wp-content/themes/twentytwelve/dummy1.png no-repeat right top; }</style>
    <div style="background#FFF url(/wp-content/themes/twentytwelve/dummy1.png) no-repeat right top">

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic