Beldion Bryan Balanan Beldion Bryan Balanan - 2 months ago 12
HTML Question

how to properly identify the link for img src in wp

<img src="/wp-content/themes/charitas-lite/images/flag_150.gif">


Here is the code for displaying the image. I am receiving the console error


GET http://domain.org/wp-content/themes/charitas-lite/images/flag_150.gif 404 (Not Found)


Anyone here know how to do it? I am having a hard time displaying an image since I am going to put it fixed at the top of my page...

Screenshot showing that the image is really there. Proof that the image is there..

enter image description here

Answer

try this

<img src="<?php echo get_template_directory_uri(); ?>/images/image.jpg">