• Resolved rtc35

    (@rtc35)


    I have written a custom template page that loads images that I place directly into a folder via FTP. I don’t want any of the extra overhead of thumbnails or wp_post records. My template knows how to find the files and creates the <img src=’…’> tag just fine. The links are correct, but the files don’t show up on the production site, although it worked fine on my wamp localhost version. If I copy and paste the url into a new tab, I get the 404 page of my theme, even though I’m certain it’s there. I checked the read permissions of the folder and files and everything is fine. All images uploaded via the WP media uploader show up.
    Does anyone know what difference between wamp and the production server would case this issue?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Are you able to access the images directly via the browser at the path where you have them uploaded?

    You can certainly do a phpinfo() on your wamp & on the production server to see if there are any notable differences between the two.

    Can you provide some additional information like what is the folder structure where you are uploading your images? What’s the URL that you accessed it on your localhost as?

    :Vishal

    Thread Starter rtc35

    (@rtc35)

    Thanks Vishal. I didn’t know about phpinfo(). I used it to compare both servers with INFO_ALL. There was just so much to go over, most of which I don’t understand, but it’s good to know about.

    However, your question about the folder structure gave me the idea to try creating a folder outside of wp-content/uploads, which I was trying to use. It works that way and I can go ahead and keep them there instead, so that solves my problem. Thanks for the help. If anybody has any insight into why, on the production server, WordPress is preventing access to the uploads folder outside of the internal mechanisms it uses to serve up files, please comment.

    Thanks very much.

    Glad to know you were able to fix the issue.

    It could be possibly due to the permissions of the folder that you tried to create within ‘uploads’. That’s the only thing that comes to mind.

    Unsure if you tried doing 777 to the folder inside ‘uploads’ or if you have given that permission to the folder outside of ‘uploads’.

    :Vishal

    Thread Starter rtc35

    (@rtc35)

    I finally got a chance to tinker around again, but still no luck accessing images anywhere inside the uploads folder with a direct link. I thought maybe I had tried to set permissions and hadn’t noticed that it failed. It didn’t fail and I definitely set the permission on the folder and all subdirectories and files inside. I’m stumped, but I’m moving on for now…

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Images give me a 404 error when the url is correct.’ is closed to new replies.