WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Images upload fine but are broken and wont display (25 posts)

  1. active_benjamin
    Member
    Posted 3 years ago #

    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]

  2. flamenco
    Member
    Posted 3 years ago #

    Hi,
    I like to look at the easy stuff first... in Admin, Settings... Media... Uploading Files....

    Take a look at "Store uploads in this file" and see if it's wrong.That's often messed up, especially if someone moves a site.

    Even if it matches the huge path you described above, it may want the default setting, for instance.

    good luck, Dave

  3. active_benjamin
    Member
    Posted 3 years ago #

    in settings... media .... I don't have an Uploading Files ?!?! I'm on WordPress 3.0.1

    The files get put into the correct place, they're just not accessible once they're uploaded. I get broken images, and file not founds.

  4. mkirkwag
    Member
    Posted 3 years ago #

    Hi! Are you uploading via FTP, or the media uploading tool. I had to mess around uploading with the flash version, without the flash version, via FTP mess with settings, etc before I could finally get it to work. Unfortunately, I don't remember what finally made it work, but now the uploader works correctly for me...though it only correctly posts TIFF files. I know that's not much help, but just make sure you've tried all the options.

  5. esmi
    Forum Moderator
    Posted 3 years ago #

    though it only correctly posts TIFF files.

    Well, that's not right. You shouldn't be using .tiff files on the Web. Have you checked with your hosts that an up-to-date version of GD Library in installed & running?

  6. mkirkwag
    Member
    Posted 3 years ago #

    Yep. They say it is installed, running and correctly figured. They told me to try the basic theme, which I'll do now.

  7. mkirkwag
    Member
    Posted 3 years ago #

    Nope - that didn't do it either. JPGs just give me a question mark in a box, both in the dashboard in the edit post/page section and online.

  8. esmi
    Forum Moderator
    Posted 3 years ago #

    Have you tried opening up any of these .jpgs in a graphics application such as Photoshop or GIMP and re-saving them (using standard encoding or optimised for web use, if that's an option)?

  9. mkirkwag
    Member
    Posted 3 years ago #

    Well, no...seems a ridiculous amount of work when the TIFFs work fine...but I'll try it out. I gather that some browsers can't see TIFF images.

  10. mkirkwag
    Member
    Posted 3 years ago #

    That didn't work. I chose the save for the web option - still get the question mark in the blue box. The other option, from Microsoft - Jpeg2000 (jpg2)- "does not meet security requirements."

  11. esmi
    Forum Moderator
    Posted 3 years ago #

    I gather that some browsers can't see TIFF images.

    Correct. They're also much large in terms of file size than a .jpg or a .png - which means a slower download.

    What graphics application are you using to save these images?

  12. mkirkwag
    Member
    Posted 3 years ago #

    Depends...some of them were Photoshop, some "save as picture" in Word, some from Snag-it, Preview...that's all I remember.

  13. esmi
    Forum Moderator
    Posted 3 years ago #

    Stick to Photoshop for image preparation. Word may not save .jpgs correctly for web use. Not sure about the others.

  14. mkirkwag
    Member
    Posted 3 years ago #

    OK..but still...the photoshop versions don't work, either. I've tried .png, .gif and .btp as well...nothing shows up but tiffs.

  15. esmi
    Forum Moderator
    Posted 3 years ago #

    Have you tried asking your hosts about this? It's not WP that is blocking those image formats (and pretty much any .png file should work).

  16. mkirkwag
    Member
    Posted 3 years ago #

    Yes, I have, and also about the GD Library as advised here. They say it's not them...I should as WordPress.

  17. esmi
    Forum Moderator
    Posted 3 years ago #

    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?

  18. mkirkwag
    Member
    Posted 3 years ago #

    Yep.

  19. esmi
    Forum Moderator
    Posted 3 years ago #

    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?

  20. mkirkwag
    Member
    Posted 3 years ago #

    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.

  21. mkirkwag
    Member
    Posted 3 years ago #

    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!!!

  22. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

  23. mkirkwag
    Member
    Posted 3 years ago #

    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.

  24. Dmckeage
    Member
    Posted 2 years ago #

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

  25. esmi
    Forum Moderator
    Posted 2 years ago #

    Please post a new topic.

Topic Closed

This topic has been closed to new replies.

About this Topic