Background images are not appearing in my site after enabling cloudflare

#1

Hello,
Recently I have enabled cloudflare CDN in my site. Everything is working fine except home page is not loading background images. I checked GTMetrix-It’s saying some of the static contents are not in CDN

Also, I am using swift performance cache plugin along side.

Please help me. My site URL: https://enlightguru.com
Thanks,
Ritesh

#2

Strictly speaking Cloudflare is not a CDN.

Thats a common warning and actually a false warning.

I notice three images which are not loaded from your domain but from “wp-content” instead.

This would indicate you got your slashes wrong and, in fact, there are several occurrences in your CSS where you specified ///wp-content instead of /wp-content. If you fix this it should work.

#3

Hi Sandro,
Thanks for the prompt reply! I have checked the CSS and its’s showing me url containing domain name as well:
!important;background-image: url(https://enlightguru.com/wp-content/uploads/2019/02/first_screen.png?id=1001)
Again, when I am logged in images are displayed correctly.

This issue is coming only when user is not signed in. Above three images are not being cached.

Can you let me know what could be the issue?
Thanks,
Ritesh

#4

I cant tell you exactly where it comes from but on your main page alone it shows 19 URLs specified via CSS which incorrectly point to ///wp-content.

#5

Thanks Sandro! How to make sure websites are being downloaded from cloudflare? I have disabled it from Swift Performance plugin.

#6

I am not sure what you mean with that question. You just need to fix these invalid URLs.

#7

Hi Sandro,
Sorry for late reply! Could you please let me know the steps to identify those URLs? I want my developers to notify about them.

Thanks,
Ritesh

#8

The information is all in my earlier replies. Your developers should be able to spot it in a jiffy. If they dont I suggest to get new developers :smile:

#9

Thanks Sandro :slight_smile:

closed #10

This topic was automatically closed after 31 days. New replies are no longer allowed.