• Hi everyone,

    I do not use the upload function very much in my WP install – but do share/display images occasionally in my postings. I have a new strange occurrence going on. What I tend to do if I want to share an image in a posting is FTP the image up to a directory (say, “images”) then either hyperlink to the image or insert it into the posting.

    Lately something odd is going on. I upload an image to my images file (using FTP), then if I insert it into the posting, the “alt” text is displayed, but no image. If I try to *browse* the image on my own, using its direct URL (e.g. opening https://www.cosmictap.com/images/randomimage.jpg in a browser), I get a 404 response from WordPress, like this:

    404 – Not Found

    Sorry, no posts matched your criteria.

    I *know* the file is there. I *know* the permissions on the file and the images dir are 644. (Although I’ve tried setting them to 777 to no avail) .. I *know* the URL is correct. The htaccess has nothing funky (i don’t think) – just this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    It has oddly seemed to be very sporadic and sometimes apparently “self-healing” – e.g. the images will eventually start showing up, and sometimes revert back to a 404.

    I called it an “unmanaged” directory because basically WordPress doesn’t even know that directory exists – it’s independent of my WP install, so I don’t get why it’s butting its virtual nose in….

    I’m stumped, my searches on WP.org have come up with nothing spot-on, and I’m turning to all of you.

    Thanks!

    I have no clue what’s happening.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cosmictap

    (@cosmictap)

    Hmm, I just did a chmod 755 for the folder AND the files, and it seems to be working fine now. Odd – it may flake out again, but I offer this post to those who might stumble across this later….

    I *know* the permissions on the file and the —>images dir <— are 644.

    (arrows are mine)

    Your answer was in your first post, since a directory needs to be 755 to be world readable.

    The files are fine at 644.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘404 from WordPress when browsing image in unmanaged directory’ is closed to new replies.