vishnu vishnu - 3 months ago 9
CSS Question

Some images not showing on live wordpress website

I was developing a site on my localhost but when I upload it on a live server, some images are not showing.

The local version of the background image's CSS code is this:

rgba(0, 0, 0, 0) url("/wp-content/themes/school/assets/img/_EL18466.jpg") repeat fixed 50% 0 / cover


The live version of the image is:

rgba(0, 0, 0, 0) url("/wp-content/themes/school/assets/img/_EL18466.jpg") repeat fixed 50% 0 / cover;


Basically, its just the same line of code for both local and live version.

However the image on the live version is not displaying. Whats wrong? Should the URL be different on the live one?

TIA

EDIT:

Here is the screenshot of my live server's directory structure:

Server screenshot

Answer

I finally found the answer to this grueling bug

WordPress - No Background Images on Live Server

Apparently, when its on live server, the background css image code should only be:

rgba(0, 0, 0, 0) url("./assets/img/_EL18466.jpg") repeat fixed 50% 0 / cover;