WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] img src does not work! (9 posts)

  1. Amit Kvint
    Member
    Posted 1 year ago #

    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

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    The correct way to do this would be to use:

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

  3. Amit Kvint
    Member
    Posted 1 year ago #

    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.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

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

  5. Amit Kvint
    Member
    Posted 1 year ago #

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

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    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?

  7. viky081
    Member
    Posted 1 year ago #

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

    Regards,
    vicky.

  8. Amit Kvint
    Member
    Posted 1 year ago #

    Yes it did ! thanks : )

  9. Amit Kvint
    Member
    Posted 1 year ago #

    Works!

Topic Closed

This topic has been closed to new replies.

About this Topic