WordPress.org

Ready to get started?Download WordPress

Forums

changing from default permalinks break images (2 posts)

  1. swollenbrain
    Member
    Posted 6 years ago #

    when I tried to change from the default Permalinks setting, it seems to break my sidebar image as well as my header image. Any suggestions? thanks in advance.

    http://www.fasterbarnacle.com/

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    The reason it breaks your images is that you are using relative paths for those images. Your header, for example, is this code:

    <img src="images/barnaclebannerSmall.jpg" width="395" height="141" >

    That's wrong. Use the full path to the image, like this:
    http://www.fasterbarnacle.com/images/barnaclebannerSmall.jpg

    Then it won't break.

    Ideally, you would put those images into your theme directory, and then you could use code like this:

    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/barnaclebannerSmall.jpg" width="395" height="141" >

    And then it would work even if you changed the blog's address.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags