Title: Background Images
Last modified: May 11, 2020

---

# Background Images

 *  Resolved [csbwebmaster](https://wordpress.org/support/users/csbwebmaster/)
 * (@csbwebmaster)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/background-images-41/)
 * Love the plugin so far! Easy to use! THank you!
 * My site is operational today using this plugin with an AWS Cloudfront CDN. I 
   just got it going with a custom domain (CNAME).
 * I noticed that not all assets are being rewritten. The background images in DIVs
   in particular, are still coming using the non-CDN url (off the webhost instead
   of CLoudfront).
 * I realize I can manually go in and edit, but I’m curious if this is something
   that I’ve done wrong.
 * If you visit our home pages, each section has a background image. None of them
   are coming from the CDN, though the image is available from the CDN.
 * Outside of manually editing each page, how can the plugin help to ensure background
   image urls are being made available from the CDN?
 * This is the last little thing I need to figure out. But so far, this is quite
   an easy plugin to utilize.
 * Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbackground-images-41%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [csbwebmaster](https://wordpress.org/support/users/csbwebmaster/)
 * (@csbwebmaster)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/background-images-41/#post-12822077)
 * SO I did a little testing. the Plugin is clearly copying images to the CloudFront
   CDN. IN the case of regular image tags, images are generally being pulled from
   the CDN.
 * However, background images and items refered to in CSS are not. I can obviously
   hardcode the URLs in the CSS to pull from the CDN. BUt this hardcoding seems 
   really unwise.
 * Is there a needed setting so that relatively linked CSS page content source img
   urls are prepended with the CDN URN?
 * I would think localsite image references in a site’s CSS would commonly need 
   to be dynamically have their URN changed so that they pull from the CDN.
 * (PS. We are using DIVI as our theme. I can manually use hardcoded image references
   in most of the theme designer editor components. I’d just not prefer to hardcode
   them by hand).
 * Just seems like I’m missing some basic capability in the Amazon AWS CDN plugin.
   PRobably something I didnt do in setting it up corretly.
 *  Plugin Author [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/background-images-41/#post-12822128)
 * Hello [@csbwebmaster](https://wordpress.org/support/users/csbwebmaster/)
 * I am sorry for the delay in my reply.
 * The plugin relies on the the media links to be (in your case) `https://christianservicebrigade.
   ca/wp-content/uploads/...`
 * some of the media on your website is loaded as
    `src="/wp-content/uploads/...`
 * I think this is why the media do not load from cloudfront.
 *  Thread Starter [csbwebmaster](https://wordpress.org/support/users/csbwebmaster/)
 * (@csbwebmaster)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/background-images-41/#post-12822185)
 * No worries on the delay, Lucky It’s not unexpected to be patient!
 * 🙂
 * All of the images are in the uploads folder.
 * Let me see if I understand you.
 * What it appears is that the logic you are using in the plugin requires ABSOLUTE
   URL references (beginning in our case with ‘[https://christianservicebrigade.ca/…&#8217](https://christianservicebrigade.ca/…&#8217);
   in order to be rewritten. And that relative URL references are not rewritten.
   is that right?
 * The DIVI theme, when using a background image picker, puts relative URLS in place(
   like many themes / plugins do) to local media sources.
 * I don’t know that I can globally tell DIVI or WordPress to hardcode all URLS 
   to absolute.
 * SO i’m not sure what to do.
 *  Plugin Author [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/background-images-41/#post-12822211)
 * You are not alone. Lot of other users have had the same issue and I am unable
   to devote time to work on this plugin.
 * Keep a check on the update, I’ll fix this in the next release.
 *  Thread Starter [csbwebmaster](https://wordpress.org/support/users/csbwebmaster/)
 * (@csbwebmaster)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/background-images-41/#post-12822278)
 * That would be great.
 * I do like how easy you made the plugin. It is almost perfect for my needs. SOme
   of the others add such a level of overhead and complexity or do not really support
   AWS Cloudfront as anything but an ancillary CDN. I get that CLOUDFLARE is probably
   more popular today. BUt I don’t use it for many very important reasons.
 * I appreciate what you are doing and know what it’s like to give your time and
   effort. I thank you.
 * If you do take this up in a future release, that would be great. Perhaps the 
   plugin should have a configuration option to additionally rewrite relative URLS
   for selected assets available via the CDN.
 * (I wonder also if you could have a box where users can select what TYPES they
   want to come from the CDN. JPG, TIFF, ICO, PDF, PNG, and others. Might give the
   flexibility to decide what assets can be redirected through the CDN.
 * (we do have some PDFs or other doc types that we make available regularly).
 * Anyways, not suggesting that you incorporate these ideas. Just putting them forward.
   I know they would take quite a bit of time to code, test, release, support.
 * 🙂
 * Thanks for the response. I think I’ll hard code them for now. At least the bigger
   images that I want to have come from the CDN. (We have a lot of high-rez background
   images that take a lot to pull from our HOST. My organization likes them. it’s
   just that it puts a load on our host server to serve them).
 * 🙂
 *  Plugin Author [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [6 years ago](https://wordpress.org/support/topic/background-images-41/#post-12837293)
 * Support for relative URLs has been added to the plugin

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Background Images’ is closed to new replies.

 * ![](https://ps.w.org/aws-cdn-by-wpadmin/assets/icon-256x256.jpg?rev=2647571)
 * [WPAdmin AWS CDN](https://wordpress.org/plugins/aws-cdn-by-wpadmin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/aws-cdn-by-wpadmin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/)
 * [Active Topics](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/background-images-41/#post-12837293)
 * Status: resolved