• Resolved active_benjamin

    (@active_benjamin)


    I have a real brain buster of an issue with images.

    Images upload fine and get stored in the proper folder…
    I just uploaded one, and it went to the
    /wp-content/blogs.dir/27/files/2010/9 folder on the server.

    However, the image didn’t display in the uploader preview, or on the post… and I can’t direct link to it.

    Thanks in advance for any help, i’m just not sure where to go from here or what I can search for.

    This is my .htaccess file…

    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

    RewriteRule ^(.*/)?uploads/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?uploads/(.*) wp-includes/ms-files.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]

Viewing 9 replies - 16 through 24 (of 24 total)
  • Definitely not a WP core issue. Have you tried:

    – deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems?

    Yep.

    There’s absolutely no limitation on .jpgs, .pngs or .gifs in WordPress. I’ve used all three image file types in multiple different installs from WP 1.x upwards. That leaves only the server configuration or something specific to your install.

    Have you activated any anti-hotlinking in your hosting account panel?

    i *have*, you clever person! ANNNNND…I just looked and it says:

    “Block direct access for these extensions (separate by commas):
    jpg,jpeg,gif,png,bmp”

    In other words, everything I’ve tried but TIFF. It doesn’t seem like this should have any effect on MY ability to load files, but I’ll take jpeg off and try it.

    YES!!! Happy Dance!!!!
    Thank you!!

    Now a pause in the glee to clarify:
    I left jpg in the list. What I did was check a box underneath that said:
    “Allow direct requests (ie. entering the url to an image in your browser)”

    I didn’t even have to reload the jpg in my test page – it was showing when I opened it.

    YAY!!!

    Glad to hear that images are now showing correctly. ??

    Explanation: WordPress is seen by the server as just “another user” rather than “your site”, so the server blocks access to the images as per your anti-hotlinking instruction. I’ve seen a couple of people caught out by this before.

    Thanks for explaining it…I know I’m groping in the dark, but I really thought I had done that correctly. Good to know that I’m not *terminally* confused.

    I am having the same issue but I haunt changed anything on my site for months. Could anyone help.

    Please post a new topic.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Images upload fine but are broken and wont display’ is closed to new replies.