• I am developing a WP site at https://sterling-testing.com/

    I’m having an old familiar issue where you try to let wordpress dynamically locate your image directory. This is done so when you ultimately move the site live after development, the image links will not all need to be updated.

    The actual relative path to my images is here: /public_html/wp-content/themes/Astrum/images

    I’ve noticed most people use this link which seems to be an alias to the same directory: /public_html/wp-content/uploads/2013/10

    I’ve tried using both those paths in my dynamic link to no avail. The absolute URL for images would be: https://sterling-testing.com/wp-content/uploads/2013/10/

    So, when I try an image src=”” as follows, it doesn’t seem to locate the image:

    <?php bloginfo(‘template_url’); ?>wp-content/themes/Astrum/images/logos-arcat.gif

    I am pretty new to all of this, so I must be doing something simple here … Any ideas?

    Thanks
    | scott

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would do this instead:
    <img src="<?php echo get_stylesheet_directory_uri() ?>/images/aternus.png" alt="" title="" width="" height="" />

    Example taken from https://codex.www.ads-software.com/Function_Reference/get_stylesheet_directory_uri

    Thread Starter scott5150

    (@scott5150)

    Hello. Thanks. I see where you are going with this. The images folder is usually always right next to the css directory. For some reason it didn’t work.

    Here’s what i tried:

    <a href="#"><img src="<?php echo get_stylesheet_directory_uri() ?>/images/logos-arcat.gif" class="float-left home-logo-pad" alt="ARCAT" width="164" height="163" /></a>

    I wonder if part of the problem is that I can’t vouch for the WP install this place did before I got here. It looks like it was all installed directly inside the servers “public_html” folder. It’s not in any subfolders. Is WP anticipating another level in the root directory?

    Also, is there a way to echo out what my images directory is? I wonder if I just have a weird images path on this one. I really can’t seem to figure out why no dynamic images will show on this one when I’ve had this process work so well in the past.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Images not showing up using dynamic linking procedure’ is closed to new replies.