J
J
justifycontent2020-06-22 05:23:23
WordPress
justifycontent, 2020-06-22 05:23:23

Why is it giving an error and not uploading some pictures?

sKZM9vQ.png

My paths are relative:

<img src="assets/img/logo/sajooo.png" alt="">
<img class="nav__search" src="assets/img/icons/serch.png" alt="">
<img class="nav__basket" src="assets/img/icons/shop_box.png" alt="">
<img class="nav__lk" src="assets/img/icons/li.kab.png" alt="">


I tried to set paths through the domain, they still did not load. Example:
<img class="nav__basket" src="https://Domen.com/assets/img/icons/shop_box.png" alt="">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d4c4237abc, 2020-06-22
@justifycontent

<img src="<?php echo get_template_directory_uri();?>/assets/img/logo/sajooo.png" alt="">
<img class="nav__search" src="<?php echo get_template_directory_uri();?>/assets/img/icons/serch.png" alt="">
<img class="nav__basket" src="<?php echo get_template_directory_uri();?>/assets/img/icons/shop_box.png" alt="">
<img class="nav__lk" src="<?php echo get_template_directory_uri();?>/assets/img/icons/li.kab.png" alt="">

Use the function <?php echo get_template_directory_uri();?> to form the correct path

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question