Uploaded images problem after 2.8.1 upgrade

Just upgraded to 2.8.1 on my test server, and now have an issue with images that were/are uploaded to the media library not appearing.

Prior to the upgrade, images that were uploaded to the media library (either via the admin, or the WYSIWYG tool) would be called via the path:


After the upgrade, no existing images are displaying, nor are images that I’ve uploaded since the upgrade.The record for the images exists, but there is no way to view the image.

It appears that after the upgrade the path being used by WPMU is no longer pointing to the actual location of the files which appears to be in wp-content/blogs.dir/1/files (or /2/files, /3/files, etc.)

Any thoughts or tips?

  • airfoil
    • Site Builder, Child of Zeus

    Another post (blogs.dir images not appearing and article links 404) seems to address a similar problem, so I checked my .htaccess file, which seems fine – didn’t change since upgrading to 2.8.1.

    As mentioned before, images that are uploaded are landing in the correct directories (wp-content/blogs.dir/1/files,/2/files, /3/files, etc.) but when the system tries to call them via the path sub1.mydomain.com/files/2009/07/myimage.jpg – nothing.

    The htaccess file does contain the following line, which seems to deal with paths for uploaded images:

    <br />
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]<br />

    I don’t know enough about how the htaccess file works with WPMU to determine if there is a change needed here, but it appears it might be a place to start.

    Attached is a screenshot from the Media Library admin panel that shows how images are just not displaying.

    When I view source, the code shows that it is rendering the IMG tag…

    <table class="slidetoggle describe form-table"><br />
    <thead class="media-item-info"></p>
    <p> <tr><br />
    <td class="A1B1" rowspan="4"><img class="thumbnail" src="http://test.airfoil.net/files/2009/05/testimage.jpg" alt=""></td><br />
    <td>testimage.jpg</td><br />
    </tr><br />
    <tr><td>image/jpeg</td></tr><br />
    <tr><td>2009-06-08 10:14:57</td></tr><br />
    <p> </thead>

    …but the image doesn’t display. If I type the path directly into a browser, I get a 404.

    So, it seems that WPMU is no longer translating "http://test.airfoil.net/files/&quot; to the directory "blogs.dir/1/files" – resulting in it not finding the image.

  • lonchbox
    • WPMU DEV Initiate

    Hi Andrew,

    My .httaccess file have this:

    RewriteEngine On

    RewriteBase BASE/

    #uploaded files

    RewriteRule ^(.*/)?files/$ index.php [L]

    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*

    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    # add a trailing slash to /wp-admin

    RewriteCond %{REQUEST_URI} ^.*/wp-admin$

    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule . - [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]

    RewriteRule . index.php [L]

    <IfModule mod_security.c>

    <Files async-upload.php>

    SecFilterEngine Off

    SecFilterScanPOST Off



    I haven´t changed since the instalation. and the blogs.dir have 777.

    BTW. This happend when I choose a new permalink structure.


    Also checking the blog configuration I see this:

    Upload file: files

    Fileupload URL: http://blogs.mydomain.com/files

    Any idea!? :slight_frown:


  • kosmo_p
    • WPMU DEV Initiate

    I am having the same issue – I checked my .htaccess file and it appears to be exactly as the one aboe and it did not have BASE.

    I am in a 2.9.2 MU install using the WPMU BP Daily Buddy Press theme.

    files are there, even are blocked out in post – but if you click the image you get a 404…

  • JohnyRed
    • WPMU DEV Initiate


    Im also getting the same problem (Images I upload via the media library in WPMU (2.9.2 with buddypress) are only visible when users are logged in)

    Here is a link to a post with an image on it:


    When logged in the image src is: http://www2.gamesphere.com.br/files/2010/07/fifa10-150×150.jpg

    When not logged in src is: http://www2.gamesphere.com.br/4/2010/07/fifa10-150×150.jpg

    The relative info in my .htaccess looks like this:

    `RewriteEngine On

    RewriteBase /

    #uploaded files

    RewriteRule ^(.*/)?files/$ index.php [L]

    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*

    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteRule ^(.*/)?avatar/(.*) wp-content/avatar.php?file=$2 [L]

    RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]

    # add a trailing slash to /wp-admin

    RewriteCond %{REQUEST_URI} ^.*/wp-admin$

    RewriteRule ^(.+)$ $1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule . - [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]

    RewriteRule . index.php [L]`

    My WPMU is installed in a subfolder (public_html/v5/wp/)

    I read other topics on this issue but dont know how to fix it:



    Everything else works fine.

    Any tips on how to fix this would be great, thanks.

  • drmike
    • DEV MAN’s Mascot

    Well in Johny’s case, the issue is probably because wpmu is installed in a subdirectory. Lost count how many times we told people in the wpmu forums that they would have problems if they did that. It needs to be in root. That would be my guess.

  • sharonmiranda
    • Design Lord, Child of Thor

    Here it is, a year later, and several versions up and I am having this problem with images.

    Network: WP 3.3.1 Multisite, BP,

    This is functioning as two networks, although I had tried two plugins to accomplish Multi-networks, both of which had problems and so I deactivated: Networks for WordPress and WP Multi Network. Realizing Multi-networking was functioning even so doesn’t make sense. But maybe this relates to the problem.

    Problem one:

    Network 2 Site 1: Contact form 7, Cubepoints, Cubepoints Buddypress Integration Marketpress 2.4.2, Membership Premium 2.1.4

    Network 1 Site 1: No plugins active

    On site 2: I upload an image. I do not see it in the dialog box, and do see a broken link in the page. In /media library/ I see the item record but the image is not visible. I click on ‘edit’, then again on ‘edit image’ and I DO SEE the image.

    File url: http://chamberofcommons.com/wp-content/blogs.dir/2/files/2012/01/logo2501.jpg leads to ‘page not found’

    On site 1: image upload successfully

    File url: http://econethub.com/wp-content/uploads/2012/01/collage.jpg

    Replacing segments of the site 2 URL to match the site 1 URL:

    http://chamberofcommons.com/wp-content/uploads/2012/01/logo2501.jpg STILL yields ‘page not found’

    Problem 2 (maybe relates to Prob 1:

    Add a 2nd site under Network 2 as a subdomain. Exists in admin, but on site visit: “server not found”

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.