WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] img src does not work!

[Resolved] img src does not work!

  • 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!

    Thanks,
    Amit

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

    @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.

    esmi

    @esmi

    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 /”>

    esmi

    @esmi

    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?

    viky081

    @viky081

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

    Regards,
    vicky.

    Yes it did ! thanks : )

    Works!

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