Support » Fixing WordPress » img src does not work!

  • Resolved Amit Kvint


    Hi there

    Any idea why this –
    <img src=”<?php echo get_bloginfo(‘template_url’) ?>/images/footer-branding.png /”>
    Won’t work, I checked a million times & I can guarantee all is spelled correctly and the image is there! when using the inspector you get this –
    src=”http://gilataviv/wp-content/themes/gilat-aviv/images/footer-branding.png /”
    so path is O.K, but still no image is showen.

    I am working locally with MAMP PRO, obviously the static HTML & CSS “normal” version works just fine!


Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi


    Forum Moderator

    The correct way to do this would be to use:

    <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/footer-branding.png /">

    Hi thanks but it does not work! Can it be some localhost settings ?

    Like I have written before the actual static links that I see with the inspector seems to be perfect.



    Forum Moderator

    That code should work. I’ve used that (or similar) many times. What markup is it generating

    <img src=”http://gilataviv/wp-content/themes/gilat-aviv/images/footer-branding.png /”>



    Forum Moderator

    Where is wordpress installed in relation to your web root? What is the name of your current theme#s folder inside wp-content/themes? And what urls have you entered in settings -> General?

    <img src="<?php bloginfo('template_url');?>/images/footer-branding.png"/>
    try this code its may help you


    Yes it did ! thanks : )


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘img src does not work!’ is closed to new replies.