• Hey all,

    Our company recently took over a wordpress site for a client and began experiencing an issue yesterday. This is unfortunately a “no one knows who changed anything” situation as several people have backend access.

    The issue is that image paths are adding the alias of the menu item to the path.
    For example: trying to load an image from websitename.com/images/filename.png will work from the homepage, but if on the contact-us page the path will become websitename.com/contact-us/images/filename.png. This persists for about-us, etc. WordPress was not updated and is at the newest version, the theme was not updated.

    .htaccess as follows:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    There a header image which is on all pages. I’m noticing when I inspect it it shows the following:
    <img src=”images/HeaderBanner.png” alt=”” title=””>
    This causes it to attempt to find the image from the menu alias. When adding a forward slash to indicate the root before the path, it works correctly. i.e: <img src=”/images/HeaderBanner.png” alt=”” title=””>

    Is there some way to indicate to wordpress to path from the root? Does anyone know what could have affected this? Any help is very appreciated. Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter b0ldmedia

    (@b0ldmedia)

    I switched permalink settings from postname to plain and the pathing works that way. Unsure what core issue was

Viewing 1 replies (of 1 total)
  • The topic ‘Image Pathing Issue – Not from root’ is closed to new replies.