L
L
ligisayan2017-12-13 16:47:46
Images
ligisayan, 2017-12-13 16:47:46

Why are the images not displayed after transferring the site to a local server?

Transferred the site to wordpress from a permanent storage location to a local server under the leadership of open server (put it in the domains folder ), set everything up, set the paths, but most of the pictures (logo, in posts, etc.) do not pull up on it - they are displayed in the code in this form:

<a href="http://site.ru/category/article/" style="background-image: url('site.ru/wp-content/uploads/2017/12/12/12.jpg')">...</a>

But, if you hover or go to the picture, then the transition is carried out at this address
http://site.ru/site.ru/wp-content/uploads/2017/12/12/12.jpg

Where to look for the problem and how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Gorbunov, 2017-12-13
@ligisayan

When specifying a domain in the url of an image, you must specify the http:// or https:// protocol so that the server does not open it within your site, or specify the address without a domain, i.e.

background-image: url('http://site.ru/wp-content/uploads/...
background-image: url('//site.ru/wp-content/uploads/...
background-image: url('/wp-content/uploads/...

all options are correct. At the beginning // this is a shortened version without specifying http or https

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question