Images loaded as background-image are shown but s aren’t

I got a weird problem:
First of all I provide my folder structure:

wp-content/themes/theme
├──content.php
├──footer.php
├──functions.php
├──header.php
├──home.php
├──index.php
├──page.php
├──main.js
├──style.css

├── media/
│ └── img/
│ ├── beach.mp4
│ ├── contact-1.jpg
│ └── offers-1.jpg

└── scripts/
└── map.js

So, in my style.css I defined a background image like this:

background-image:url(‘media/img/offers-1.jpg’);

That get’s shown perfectly, but whatever file I load from my index.php (which loads content.php) won’t get found, i.e. I got a normal image like this

<img src=”media/img/contact-1.jpg”>

which doesn’t get found with the following error:

GET http://url/newer/media/img/contact-1.jpg 404 (Not Found)

Same for map.js, main.js and some other images.

Does anyone know what I may did wrong?

Read more here:: <a href=https://wordpress.stackexchange.com/questions/300896/images-loaded-as-background-image-are-shown-but-imgs-arent target="_blank" title="Images loaded as background-image are shown but s aren’t” rel=nofollow>Images loaded as background-image are shown but s aren’t

Leave a Reply

Your email address will not be published. Required fields are marked *