Title: Inline Background Image problem
Last modified: August 20, 2016

---

# Inline Background Image problem

 *  [johnibom](https://wordpress.org/support/users/johnibom/)
 * (@johnibom)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/inline-background-image-problem/)
 * 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](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/](http://wordpress.org/extend/plugins/w3-total-cache/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/inline-background-image-problem/#post-3381160)
 * 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">
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Inline Background Image problem’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [cdn](https://wordpress.org/support/topic-tag/cdn/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)
 * [W3TC](https://wordpress.org/support/topic-tag/w3tc/)

 * 1 reply
 * 2 participants
 * Last reply from: [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/inline-background-image-problem/#post-3381160)
 * Status: not resolved